fix: resolve Maestro taps from regular snapshots#709
Merged
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
854b911 to
8d15867
Compare
048e03f to
70f54ae
Compare
70f54ae to
fa3f8c6
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make Maestro
tapOn/swipe.labelresolve from the regular visible snapshot instead of the optimized interactive snapshot path.This keeps Maestro compatibility aligned with Maestro semantics: interactions resolve against the same visible tree that assertions inspect, so text/header/container targets such as
Albumsare valid targets even when they are not exposed as interactive-only controls.Reconcile the snapshot providers with that contract by removing arbitrary downstream node budgets from regular visible snapshots:
hiddenContentAbove/hiddenContentBelowon visible scroll containers. Fixed controls such as bottom tab bars are no longer lost behind traversal-order cutoffs, and regular snapshots reporttruncated: falsewhen all visible UI was emitted.Also remove the temporary Maestro interactive-snapshot fallback and the related diagnostics/helper surface. Compact interactive iOS snapshots are now deadline-bounded instead of node-count bounded.
Finally, stop passing
interactionOutcome.retryOnNoChangefor MaestrotapOn. Maestro flows assert the expected result in the next step, and no-op text taps are valid in existing flows; retrying purely because the UI did not change caused multi-second delays on header-title/no-op taps.Validation
pnpm build:xcuitestpnpm buildpnpm check:quickpnpm check:fallowpnpm exec vitest run src/utils/__tests__/mobile-snapshot-semantics.test.ts src/platforms/android/__tests__/index.test.ts src/platforms/android/__tests__/snapshot-helper.test.ts test/integration/provider-scenarios/ios-lifecycle.test.ts src/compat/maestro/__tests__/runtime-interactions.test.ts src/compat/maestro/__tests__/runtime-assertions.test.ts src/compat/maestro/__tests__/runtime-flow.test.tsmaterial-top-tabs.ymlbottom-tabs.ymlnative-bottom-tabs.ymlbottom-tabs.ymlnative-bottom-tabs.ymlmaterial-top-tabs.ymltruncated: false, 91 visible nodes,article/contacts/albumsbottom tab ids present, and the scroll view reportshiddenContentBelowinstead of emitting every offscreen row.