feat: Improve React Navigation Maestro reliability

Merged
TH
5mo ago
+2147-215

Summary

Improve Maestro compatibility for the React Navigation native e2e suite.

Details:

  • speed up and harden Android snapshots with richer helper metadata, visible-user filtering, foreground application-window selection, persistent helper reuse, and a bounded 500/100ms idle wait that favors transition stability over mid-animation snapshots
  • add replay timing artifacts so local and CI runs can be compared step-by-step
  • make horizontal swipes more reliable through native gesture swipe presets and reuse those presets from Maestro directional swipes
  • improve Maestro target matching around visible text, breadcrumbs, duplicate visible contexts, regex-vs-plain-text handling, and wide text containers
  • add cross-platform app state cleanup through settings clear-app-state and wire open --clear-app-state to Android pm clear plus iOS simulator container cleanup
  • document the new cleanup command and CI timing artifacts

Validation

  • pnpm format
  • pnpm check:quick
  • pnpm exec fallow audit --changed-since origin/main
  • pnpm exec vitest run src/core/__tests__/dispatch-open.test.ts src/__tests__/cli-grammar.test.ts src/utils/__tests__/args.test.ts src/platforms/android/__tests__/index.test.ts src/platforms/ios/__tests__/index.test.ts src/compat/maestro/__tests__/support-matrix.test.ts src/compat/maestro/__tests__/replay-flow.test.ts
  • pnpm exec vitest run src/platforms/ios/__tests__/index.test.ts src/platforms/android/__tests__/index.test.ts src/core/__tests__/dispatch-open.test.ts src/compat/maestro/__tests__/runtime-targets.test.ts src/utils/__tests__/selector-is-predicates.test.ts src/core/__tests__/dispatch-interactions.test.ts
  • pnpm exec vitest run src/compat/maestro/__tests__/runtime-targets.test.ts src/platforms/android/__tests__/index.test.ts src/platforms/ios/__tests__/index.test.ts src/compat/maestro/__tests__/runtime-interactions.test.ts src/compat/maestro/__tests__/support-matrix.test.ts src/compat/maestro/__tests__/replay-flow.test.ts src/platforms/android/__tests__/snapshot.test.ts src/platforms/android/__tests__/snapshot-helper-session.test.ts src/utils/__tests__/selector-is-predicates.test.ts src/daemon/handlers/__tests__/session.test.ts src/daemon/handlers/__tests__/session-replay.test.ts src/daemon/handlers/__tests__/session-test-artifacts.test.ts src/daemon/handlers/__tests__/session-replay-vars.test.ts src/core/__tests__/dispatch-open.test.ts src/core/__tests__/dispatch-interactions.test.ts src/__tests__/runtime-interactions.test.ts src/__tests__/cli-grammar.test.ts src/replay/__tests__/script.test.ts src/utils/__tests__/args.test.ts src/daemon/__tests__/request-handler-catalog.test.ts
  • pnpm test
  • pnpm build