Repository navigation
Conversation
🟢 e2e web: 95 passedAll 95 tests in 43 files
Tested by e2e 0.24.0 · 1m 7s · web · run artifacts |
🟢 e2e web agent: 34 passed35 agent steps · 26 replayed from cache · 25 model calls · 133.6k tokens (94% cached) · $0.0053 All 34 tests in 5 files
Tested by e2e 0.24.0 · 1m 43s · web · run artifacts |
🟢 e2e android agent: 20 passed24 agent steps · 15 replayed from cache · 51 model calls · 389.7k tokens (85% cached) · $0.0234 All 20 tests in 1 file
Tested by e2e 0.24.0 · 6m 6s · android-emulator · run artifacts |
🟢 e2e ios: 63 passed, 1 skippedAll 64 tests in 7 files
Tested by e2e 0.24.0 · 7m 23s · ios-simulator · run artifacts |
🟢 e2e ios agent: 1 flaky, 20 passed, 1 skipped25 agent steps · 12 replayed from cache · 58 model calls · 670.6k tokens (80% cached) · $0.0478
|
| Test | Agent | Time | |
|---|---|---|---|
| tests-agent/scenarios.e2e.ts · 1 flaky, 20 passed, 1 skipped | 25 steps · 58 calls | 8m 24s | |
| 🟢 | act completes Login Form | 1 step | 45.4s |
| 🟢 | act completes Infinite Scroll List | 1 step | 41.5s |
| 🟢 | act completes Modal Flow | 1 step | 12.4s |
| 🟢 | act completes Bottom Tabs | 1 step | 10.7s |
| 🟢 | act completes Text Input Variations | 1 step | 16.0s |
| act completes Broken Accessibility (1 failed attempt first) | 2 steps · 7 calls | 29.8s | |
| 🟢 | act completes Vision Only | 2 steps · 6 calls | 25.2s |
| 🟢 | act completes Gestures | 1 step · 7 calls | 26.8s |
| 🟢 | act completes Async States | 1 step · 7 calls | 22.6s |
| 🟢 | act completes Debounced Search | 1 step · 1 call | 28.3s |
| 🟢 | act completes Flattened Registration Form | 2 steps · 1 call | 25.5s |
| 🟢 | act completes Flattened Login | 2 steps · 10 calls | 50.3s |
| 🟢 | act completes Sticky Chrome Target | 1 step | 13.4s |
| 🟢 | act completes WebView Accessibility | 1 step | 12.3s |
| 🟢 | act completes Permission Prompt | 1 step | 11.5s |
| 🟢 | act completes Photo Picker | 1 step · 2 calls | 27.5s |
| 🟢 | act completes Product Catalog | 1 step | 10.6s |
| 🟢 | act completes Error Recovery | 1 step | 10.1s |
| 🟢 | act completes Choice Controls | 1 step · 5 calls | 34.0s |
| 🟢 | act completes Stripe PaymentSheet | 1 step · 12 calls | 35.2s |
| 🟢 | act completes Apple Pay | 1 step | 14.9s |
| ⏭️ | act completes Apple Pay Billing Address (skipped: the CI simulator's Apple Pay sheet skips the billing-address step, so the scenario cannot be completed there) |
Tested by e2e 0.24.0 · 10m 51s · ios-simulator · run artifacts
🟢 e2e android: 64 passed, 1 skippedAll 65 tests in 7 files
Tested by e2e 0.24.0 · 9m 14s · android-emulator · run artifacts |
bd23ae1 to
ba123d5
Compare
…ty box A path swipe waits for a box with a width and a height, and rounds a percentage once to a pixel inside the box. Name locator.swipe wherever performAt's callers and the iOS keyboard rule are listed, and tighten the docs, type comments, and tests from review.
MicrobenchmarksFor ⚪ No case changed by 0.5% or more. Repeatability: two builds of the head agree in every case, 10 trials each. Base A direction is reported only when the trial ranges of base and head do not overlap and the change is at least 0.5%.
How this is measuredInstructions per iteration: the difference between a run of N and of 3N iterations, divided by 2N, so startup, loading, warmup, and compilation cancel. 5 trial(s) per case and checkout. Lower is better. Machine: linux x64, AMD EPYC, Node v26.13.1, valgrind-3.22.0, ASLR off.
Workflow run: each job's summary, and |
What
locator.swipe()takes a path,{ from, to, duration? }, with both points relative to the node:tap({ position }). A percentage is a share of the boxboundingBox()reports, rounded to a pixel inside it.INVALID_ARGUMENTdurationthat isn't a whole number from 16 through 10000 ms, a negative or non-finite coordinate, or a string that isn't a percentage from'0%'through'100%'UNSUPPORTED_CAPABILITYswipeToin its pointer actionsACTION_FAILEDLOCATOR_NOT_FOUNDWhy
A direction swipe on the web is a wheel event, so a pager built on pointer events doesn't move.
screen.swipe({ from, to })drags, but uses screen coordinates, so tests had to read the node's box and add its offset to each point.How it works
performWithininstead ofperform(packages/core/src/locator/screen.ts:598).swipePathvalidates the points and the duration and builds theswipeToaction forlocator.swipeandscreen.swipe. Only a locator takestimeout(packages/core/src/locator/screen.ts:770).performWithinscrolls the node into view when the engine listsscrollIntoView, then waits for a visible box, as fortap({ position })(packages/core/src/locator/engine.ts:601). For a swipe, it also waits for non-zero width and height, since every percentage on an empty box lands on one line.resolveBoxPointturns both points into viewport points (packages/core/src/internal/geometry.ts:101). A pixel is added to the node'sorigin, the cornertap({ position })uses. A percentage goes throughresolveCoordinateonrect, the boxboundingBox()reports, and is rounded once to a whole pixel inside it (packages/core/src/internal/geometry.ts:89). So'0%'and'100%'stay inside a box that starts between two pixels.dispatchAtsends the engine oneswipeTothrough itsperformAt(packages/core/src/locator/engine.ts:636). The web and mobile engines already declareswipeToforscreen.swipe, so neither engine changes.Percentages use the box
boundingBox()returns. In a frame, that box is clipped to the frame, and the web engine doesn't keep the node's full size. Keeping it would take a newSemanticNodefield across the engine protocol. In the top-level document, the box can extend past the viewport.When the app window's position on screen isn't known (such as a windowed iPad app), a direction swipe fails with
ACTION_FAILED, while a path swipe still runs from the offset box. The reference page documents this. To refuse it, the harness would need a contract change so the engine knows the points came from a box.Issue
Part of ENG-1434.
Verified
Ran it locally: yes
Web, testbed on Chromium. The pad reports where a swipe started and ended, relative to its own corner:
{ from: { x: 10, y: 20 }, to: { x: '75%', y: '10%' }, duration: 200 }on the 320 × 200 pad readsswiped from 10,20 to 240,20. In Firefox 159 (web({ browser: 'firefox' })), the same file passes 8 of 9, and the new test reads the sameswiped from 10,20 to 240,20.raw mouse input drags along the padfails withswiped from 10,19 to 150,19instead of10,20 to 150,20. It fails the same way in Firefox onmainat634d0604, before the rebase, and it doesn't calllocator.swipe.Devices: an iOS 27.2 simulator (iPhone 18 Pro) and an API 36 emulator (Pixel 7,
google_apisarm64), each created for this run, with the Release benchmark app built the waymobile.ymlbuilds it. The mobile benchmark's pad test,a locator swipe follows a path relative to the node, swipes the pad from'80%'to'20%'and checks the reported start and end against the pad's width:The Android failure timed out in
beforeEach, waiting for the scenario list after the first app install, before any swipe. It's the same failure as on the previous head, and it didn't come back in 3 more runs.A throwaway test swiped the same pad and logged where the pad saw each swipe start and end, in points:
boundingBox()reports on each platform.'90%'starts at 333 of 370 points on iOS, and at 341 of 379 points on Android (the 996 × 210 box is 80 points tall).'90%'to'10%'swipe, iOS reported x=53 for a target of 37 points, and Android reported x=14 for a target of about 38.The full mobile suites weren't run on this head. The pad tests above were.
pnpm bench:ab --suite testbed -- tests/pointer.e2e.ts:bench-ab:
956f7417(merge base with origin/main) vsd166ef6bapps/testbed:
e2e run --workers 1 tests/pointer.e2e.ts. 12 pairs in random order, resolved after 12 pairs. Threshold ±5% and 10 ms. darwin arm64, Apple M5 Pro x18, Node 24.22.1, load 20.2.Behavior
These tests are left out of the timing rows below.
Timings
Every row but the process wall clock covers the 616 tests whose behavior matched.
Counters
Tests outside the threshold: 0 of 616
With 616 tests compared at 95%, about 30.8 could land outside by chance.
The wall-clock measurement includes the added test. None of the compared steps were marked slower.
Docs pages: no before and after screenshots. The docs site isn't in this repository, so it can't be rendered locally.
pnpm docs:checkcompiles every changed page.The video below is the Chromium run of the
locator.swipetest.Checklist
pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.!, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md).docs/**/*.mdxpage for the behavior, andskills/e2e/if the skill describes it..d.tsreviewed,tests/types/sdk-types.tsupdated; wire change edits the schema and both fixtures.e2e/engine): changesets fore2e,@e2e-dev/web, and@e2e-dev/mobile.locator-swipe-chromium.webm