* feat(locator): tap a node count times with tap({ count })
Part of #1855 (`locator.tap({ count: 3 })`). count 2 dispatches doubleTap;
3 or more go through a new multiTap action kind that web and mobile declare.
* fix(locator): cap tap count at 10 and cover multiTap across the protocol
- tap/click count accepts integers 1 through 10 (agent-device takes up to
200; no real multi-tap needs more); TapOptions, screen reference, and the
skill say so.
- Mobile reference lists multiTap under perform, with doubleTap's cadence
caveat and the modifiers refusal (en, ja, zh).
- Engine protocol test: multiTap is advertised and its count and modifiers
reach the served engine unchanged.
- requireTapCount moves above requireModifiers' doc comment.
- web() declares multiTap in surface-of; the no-multiTap refusal asserts
locate is never called instead of timing it.
* docs(locator): document tap count limits in the skill and translations
Add the count bullet and its throws rows to the ja/zh tap reference,
list multiTap under tapModifiers in ja/zh engine.mdx, and add blur to the
zh mobile perform row. The skill note now says count 2 is doubleTap, 3+
needs multiTap, and a count above 1 does not combine with position.
Reword the TapOptions.count contract the same way: count 1 beside
position stays accepted, since it is the default plain tap.
* fix(locator): drop the tap count cap, label double taps with their count, and fill the contract fixtures
Core accepts any positive safe integer as a tap count again, as #1855
planned; each engine keeps its own limit. The mobile engine refuses a
multiTap above agent-device's 200 presses with UNSUPPORTED_CAPABILITY
before it presses anything.
tap({ count: 2 }) still sends doubleTap but records "<label> 2 times",
like 3 or more. dispatchTap now builds every tap-family step label and
runs the action, so the multiTap branch is one call.
The valid engine manifest fixture lists multiTap. The Playwright guide
maps click({ clickCount }) to tap({ count }), and the changeset and
screen reference say how a browser and a device each receive the taps.
A unit test pins tap({ count: 1, position }) as a pointer tap.
* docs(locator): qualify multi-click on devices and tighten tap count tests
The multiTap contract and docs said the platform reads the taps as one
multi-click. That holds in a browser; a device presses them at its own
cadence, which a gesture detector may not read as one. Say so in the
contract, the engine reference, and the skill, and note on the mobile page
that a large count needs a longer timeout (about 285 ms a press on iOS).
Tests: send Number.MAX_SAFE_INTEGER through the fake engine to pin that
core has no cap, check count 1 keeps the bare step label, and run the
mobile count-201 refusal as a test step, asserting no device call at all,
so a guard moved after the settle and steady waits fails.
* test(mobile-benchmark): land tap({ count: 3 }) as three presses on a device
Runs in the mobile workflow's iOS simulator and Android emulator jobs with
the real agent-device, next to the double-tap case.
* docs(locator): say tap count is a positive safe integer and note the mobile limit
core accepts a count that is a positive safe integer, and the mobile engine
refuses a multi-tap above 200 with UNSUPPORTED_CAPABILITY. Say both in the
TapOptions JSDoc and its reference blocks, the tap() option and throws
table, and the e2e skill, and list the multi-tap among the cancellable
device inputs in the mobile reference. Comment and docs only.
* docs(skill): rewrap the tap count sentence
---------
Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
@e2e-dev/mobile-benchmark
An Expo app (iOS and Android) of self-contained scenarios that are hard to automate on a device, and the e2e suites written against them. Every scenario isolates one awkward mobile surface: a merged accessibility tree, a hidden one, native alerts stacked on modals, a keyboard covering the submit button, virtualized lists whose off-screen rows are not in the tree, a WebView, an OS permission dialog, out-of-process payment sheets. A test either handles that surface or fails for exactly that reason.
The app is copied from apps/mobile-benchmark in the e2e-inc monorepo,
where the same scenarios gate the autonomous QA agent. Keep diffs against
that source minimal so scenarios port both ways. Scenarios distilled from
real production apps name no company: describe the surface, never the
source.
Layout
The Expo project sits at the package root, unlike web-benchmark, because
Expo's tooling (Metro, CNG, autolinking) reads app.json and package.json
from the directory it runs in.
src/examples.ts: the catalog. Every scenario'scomponent,name,description, and optionalplatform/screenOptions. One component per scenario insrc/Examples/; the home list renders one row per scenario, its test id the scenario name, and pushes each as its own stack screen. The deep linke2e-benchmark://<name lowercased, spaces replaced by hyphens>(e2e-benchmark://login-form) opens a scenario directly.modules/apple-pay-lab: the local Expo module (PassKit, iOS only) behind the two Apple Pay scenarios.e2e.config.ts+tests/: the deterministic suite, locators only.e2e.agent.config.ts+tests-agent/: the agentic suite, derived from the deterministic config. Oneagent.actper scenario (Control Inventory excepted) with the catalog description as its goal and a deterministic check on the success message. A scenario whose tree is merged or hidden on purpose tells the model so and is judged from a screenshot; one whose surface renders out of process (PassKit, the photo picker) says the sheet is not in the tree, and the model asks for the screenshot itself; the photo picker seeds its receipt into every booted simulator first. Scenarios the harness cannot finish yet are declared with agapand skip with that reason, so every run shows what is still missing.
The deterministic suite runs in CI on every pull request (.github/workflows/mobile.yml):
an iOS simulator on a macOS runner and an Android emulator on Linux, with the
Expo build cached per native fingerprint and its JS bundle repacked on a hit.
The agentic suite runs there too, for this repository's branches. It replays
the recordings committed under .e2e/cache/ and calls the model for a step
with none. Both platforms' entries are recorded on a Mac with test:agent
(below), an iPhone 17 Pro simulator on the pinned iOS runtime and a Pixel 7
API 36 emulator, and committed in the same pull request as the scenario
change. Android runs with --strict-cache, so a recording that no longer
replays fails its step as REPLAY_STALE instead of handing it to the model.
iOS replays leniently: three recordings hand off on every run, three more
on the CI simulator only, and strict mode waits on them.
- Debounced Search: the replay looks before the debounced results render, and relocation settles on the search field's wrapper, which reads "Benchmark Target" too, instead of waiting for the result row.
- Choice Controls: the keyboard the notes field raises covers the Mushrooms checkbox, which iOS then drops from the tree.
- Stripe PaymentSheet: the card form's fields are not in the tree after the Card tab is tapped on the sheet.
- Login Form (CI only): the CI simulator reads the screen's route as its
title,
Login Form, where a Mac reads the back button'sBenchmark Examples, so the recorded start route does not match. - Photo Picker (CI only): the recorded tap names the photo by the time it
was seeded,
Photo, October 03, 22:50, which is another time on another simulator. - Permission Prompt (CI only): every recorded action replays, but the
recorded end state,
Microphone enabled, does not show. Each job posts its first pass to the pull request as one comment (e2e ios: 44 passed,e2e android agent: ...) through@e2e-dev/github, like the web benchmark's two. The second pass over failed tests posts nothing, so a green job whose comment lists failures is one that pass recovered.
Running
Native projects are generated with CNG (ios/ and android/ are ignored);
expo run:* prebuilds them on first use.
Built with Xcode 27, an app without UIKit scenes crashes at launch on iOS 27
(#1894). The SDK 57 template has none, so app.json turns them on with
expo-build-properties' ios.enableSceneSupport. An ios/ generated
before that still crashes: regenerate it with
pnpm --filter @e2e-dev/mobile-benchmark exec expo prebuild --platform ios --clean.
On SDK 58, whose template has scenes, remove the expo-build-properties
plugin entry and dependency.
pnpm build # from the repo root, once
pnpm --filter @e2e-dev/mobile-benchmark ios # build + install on the booted simulator
pnpm --filter @e2e-dev/mobile-benchmark android # same for the running emulator
pnpm --filter @e2e-dev/mobile-benchmark test # tests/ on both targets
AI_GATEWAY_API_KEY=... pnpm --filter @e2e-dev/mobile-benchmark test:agent
The configs pin the app by bundle id (dev.e2e.benchmark) and expect it
installed. To install a build first, point E2E_MOBILE_BENCHMARK_IOS_APP at
a simulator .app or E2E_MOBILE_BENCHMARK_ANDROID_APP at an .apk; the
build fixture in tests/fixtures.ts installs it once per device. eas build --profile benchmark produces
both (link your own Expo project first with eas init).
Run one target or one file at a time from the package directory while authoring:
cd apps/mobile-benchmark
node node_modules/e2e/dist/cli/bin.js run tests/login-form.e2e.ts --target ios-simulator
Android note: the Android Gradle Plugin's prefab step fails on very new JDKs (observed on JDK 26). Build with JDK 17 through 21.
Scenario contract
Every scenario ends in a deterministic success state. Where the
accessibility tree is intact, the terminal element carries
testID="success-message". The adversarial scenarios (Broken Accessibility,
Vision Only, Flattened Registration Form, Flattened Login) omit test ids and
hide or merge the tree on purpose, so success is only visible in pixels.
Control Inventory is the exception: it is not a hard surface and has no
success state. It holds plain controls with every state exposed, for the
deterministic suite (tests/controls.e2e.ts, tests/device-fixture.e2e.ts);
the agentic suite leaves it out.
The Login Form and Flattened Login account is declared as the benchmark
credential in e2e.config.ts, so tests reach it through
credentials.user('benchmark').
| Scenario | What it gates |
|---|---|
| Login Form | Form filling, validation errors, credential handling |
| Infinite Scroll List | Paginated scrolling to a target deep in a list |
| Modal Flow | RN Modal + native Alert stacking |
| Bottom Tabs | Tab navigation and acting inside a tab |
| Text Input Variations | Secure, numeric, and multiline inputs gating a submit button |
| Broken Accessibility | accessible={true} merges the whole screen into one a11y node |
| Vision Only | A11y tree fully hidden (canvas/Flutter-style app), pure vision |
| Gestures | Long-press, swipe, double-tap |
| Async States | Initial loading, pull-to-refresh, transient toast |
| Debounced Search | Debounced input + async results |
| Huge Virtualized List | Long scroll jumps sized from scroll extent (virtualized rows) |
| Flattened Registration Form | Vision-focused typing into an accessible={true} merged form |
| Flattened Login | Credential fill via focused typing when accessible={true} hides the tree |
| Sticky Chrome Target | Off-screen tap scrolled clear of a sticky footer |
| WebView Accessibility | Browser semantics projected into the native a11y tree; fill + submit a web form |
| Permission Prompt | OS permission dialog (outside the app a11y tree) + denied-state recovery |
| Photo Picker | Selecting a seeded photo via the out-of-process system photo picker |
| Product Catalog | Near-identical repeated cards, drill-in detail, stepper, cart verification |
| Error Recovery | Retryable error banner, then a destructive-confirm modal |
| Choice Controls | Radio group, checkboxes, switch, keyboard-dismiss-gated submit |
| Stripe PaymentSheet | Stripe SDK-owned test checkout sheet with native keyboard and moving refs |
| Sequential Onboarding | Auto-focused wizard steps where the keyboard covers Continue |
| Apple Pay (iOS) | Out-of-process PassKit sheet the agent must authorize |
| Apple Pay Billing (iOS) | PassKit sheet requiring a billing address filled from vision before paying |
| Control Inventory | Plain controls, one exercise per runner verb, read, and matcher |
Apple Pay fixture
modules/apple-pay-lab presents the PassKit sheet. The app carries the
com.apple.developer.in-app-payments entitlement for the placeholder
merchant.dev.e2e.benchmark merchant id; simulators do not validate the
merchant against a provisioning profile, so the sheet presents with
simulated test cards. It renders out of process and never appears in the
app's own accessibility tree, which is what the scenario gates.
Stripe PaymentSheet fixture
The scenario calls initPaymentSheet and presentPaymentSheet from
@stripe/stripe-react-native, so the sheet, card fields, validation, focus,
and keyboard handling are Stripe's own. It uses Stripe's public React Native
example backend for disposable test-mode customers and PaymentIntents; no
secret and no real charge is involved, but it needs network access to that
demo backend.
Adding a scenario
- Create
src/Examples/YourCase.tsx. Keep it deterministic (fixed data, fixed timings) and end in a persistent success state. - Register it in
src/examples.tswith a description of what the agent must do; the description is the agentic suite's goal. - Add it to
tests-agent/scenarios.e2e.ts, and totests/when locators alone can finish it. If the case is about degraded accessibility, hide or merge the tree on purpose and skip test ids: that is the point. - If it came from a real app, describe the surface, not the company.