Skip to content

test: add shared selector action/outcome helpers - #296

Merged
piotr-iohk merged 17 commits into
mainfrom
codex/e2e-outcome-pilot
Nov 10, 2026
Merged

piotr-iohk merged 17 commits into
mainfrom
codex/e2e-outcome-pilot

Conversation

@piotr-iohk

@piotr-iohk piotr-iohk commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Companion: #298

Mobile E2E steps can continue after an interaction without proving that the intended state appeared. This foundation adds shared selector action/outcome helpers: execute an action once, then poll fresh observations and fail with the last observed state.

Changes

  • Add typed outcomes for visibility, enabled state, input values, scoped text, keyboard state and required transient feedback.
  • Re-resolve observations, settle swipe destinations and preserve failure diagnostics. Android transient observation restores the previous idle timeout, including error paths.
  • Share Send validation without relaxing required warning, disabled-button, rejected-digit or invoice-amount assertions.
  • Let callers choose swipe settling while preserving the existing default.

The five-file payload contains the helpers, their unit tests and a Python-bytecode ignore entry. #298 applies this foundation to the thirteen gate cases. The local experiment specs, benchmark runner/config, comparison reports and runner-only tests have been removed from the merge payload.

Validation

At 778c9ea869467c7867573fd9c9eef58815bc48f7, TypeScript, ESLint on all changed TS/JS, diff checks, 97 TypeScript tests and 27 Python tests pass. The nine retired Python tests belonged exclusively to the deleted benchmark runner. Independent review verified complete removal/reference closure and unchanged retained production code.

The cleanup is carried into #298 at 37f8123aeaa5ba9f097f79a84d28ff46c6b9afec, where 137 TypeScript + 27 Python tests and the same static checks pass. Every retained production helper, spec, runtime config, CI script, package and assertion is byte-identical to CI-tested 38b1255. Independent CI-applicability review confirms no new mobile run is needed for these packaging-only deletions. Prior mobile results retain their actual tested revision: iOS 12/13 first attempt, 13/13 after one unchanged Multi-address3 receipt retry; Android 3/3 targeted cases first attempt. Their failure evidence and limitations remain in #298.

Historical experiment evidence

The complete pilot remains available at immutable commit 96d6fcabea2ad3b86c223299c2f83d057c8806d3, including its protocol and reproduction instructions, onboarding/Receive results, Send readiness/toast investigation, Node comparison and element-wait comparison. Their original source pins, failed attempts and limitations are preserved; they are historical experiments, not current reliability certification.

This PR is ready for review with #298. Merge this foundation first, then retarget #298 to main.

@piotr-iohk piotr-iohk changed the title test: introduce selector action/outcome pilot test: add shared selector action/outcome helpers Nov 10, 2026
@piotr-iohk
piotr-iohk marked this pull request as ready for review November 10, 2026 08:41
@piotr-iohk
piotr-iohk requested review from a team, ben-kaufman and pwltr and removed request for a team November 10, 2026 08:52

@talosmachina talosmachina left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings. Adds the shared action/outcome helpers (outcome.ts: run an action once, then poll fresh selectors, with transient-feedback, swipe-settle and idle-timeout restore), moves send_1 validation onto them in send-validation.ts, and makes the swipe settle configurable. Reviewed 778c9ea, full tier, static only.

What I checked, and 3 candidates I ruled out

Read in full: test/helpers/outcome.ts, test/helpers/send-validation.ts, the swipeFullScreen hunk in actions.ts, plus getAccessibleText, elementById, elementByText and confirmInputOnKeyboard that the helpers call.
Build/tests: not run. talos-pr-run could not confirm the author's write access on this repo, so it refused and the review is static. No CI checks are reported on the branch.

Ruled out

  • swipeFullScreen default changes: settleMs defaults to 500, so existing callers still sleep 500 ms. Only swipeAndExpect passes 0, and its destination-bounds stability check takes over that job.
  • Idle timeout left at 0 after a failed observation: withObservationIdleTimeout restores in finally and rethrows the observation error first, so a failure never leaves waitForIdleTimeout at 0.
  • Validation weakened compared with the old send_1: each rejected input still requires its toast to appear (absent before the action) with Continue disabled, and the over-limit digit still requires SendAmountExceededToast plus the unchanged field value. The old retry-on-failure loops are gone, which tightens the test instead of loosening it.

Merge confidence: 4/5, no findings, but the helpers were neither built nor run here and the branch shows no CI.

@pwltr pwltr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 778c9ea. No findings.

The new outcome helpers run each action once and then poll only observations, re-resolving elements on every poll. Transient feedback must be absent before the action and is read before persistent state. Android's idle timeout is restored after observing, also on failure, and a failure keeps its original error while saving evidence. Swipes wait for a stable destination, and swipeFullScreen keeps its 500 ms settle by default. The send validation rebuilt on them checks the same cases, including the rejected over-limit digit.

Review details

General review
Model: Claude Opus 5.5
Reasoning effort: high

@piotr-iohk
piotr-iohk merged commit 3bb0130 into main Nov 10, 2026
@piotr-iohk
piotr-iohk deleted the codex/e2e-outcome-pilot branch November 10, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants