feat(engine): resolveExpression is the reference locator semantics, and a scripted engine drives the runner through every matcher

Merged
OK
1mo ago
+2381-260

Stacked on oskar/web-closed-roots.

  • e2e/engine exports resolveExpression(expression, nodes, { selector? }), the reference locator semantics over a semantic tree: query kinds, states, level, the visible flag, scopes as strict descendants, hasText and has, first/last/nth, with text and label answering the innermost match when a container echoes a descendant's text. An engine whose tree is the whole truth calls it instead of carrying a copy (the device engine adopts it next). Changeset e2e minor.
  • The scripted in-memory engine (tests/helpers/scripted-engine.ts) is a configuration of the instrumented fake-engine.ts over that resolver: a mutable scene, per-attempt timers, every action and pointer kind, keyboard, session hooks, stale and failing actions, typed call records.
  • Five suites drive the real runner through it in seconds: scripted-matchers (every matcher, .not, list forms, failure codes and messages), scripted-reads (every read, strictness, the secure-field refusal), scripted-actions (every dispatch payload, pointer actions, key grammar), scripted-polling (late nodes, growing counts, the negation grace, stale relocation, scrollUntilVisible), scripted-capabilities (every UNSUPPORTED_CAPABILITY path).
  • One screenOver builds every unit-test screen (press-sequentially, filter-has, scroll-until-visible, the screen fixture preset); engineConfig replaces the as E2EConfig casts. Unit tests for isChecked, isEnabled, filter({ has }), and the cache listing's truncated row.

Devin Review