Skip to content

feat(web): run a selector inside a locator with browser.locator(css, { within }) (ENG-1211) - #2334

Open
KrzysztofMoch wants to merge 3 commits into
mainfrom
t3/locator-within-option
Open

KrzysztofMoch wants to merge 3 commits into
mainfrom
t3/locator-within-option

Conversation

@KrzysztofMoch

@KrzysztofMoch KrzysztofMoch commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

What

browser.locator(selector, { within }) runs a CSS or XPath selector inside another locator, the way Playwright's within.locator(selector) does:

const row = screen.getByRole('row', { name: 'Grace' });
await expect(browser.locator('td.price', { within: row })).toHaveText('$9');
await browser.locator('button', { within: browser.frameLocator('#grid').getByRole('row', { name: 'Linus' }) }).click();

within is any locator from this test's screen or browser (filtered, positioned, or, or inside frameLocator), and the result stays in its frame. It is web only, as the ticket decided: the shared Locator gets no locator(), and device and desktop take no within. A frame's locator() takes no options either, and now throws INVALID_LOCATOR for a second argument instead of dropping a within. A second argument that is not an options object now throws INVALID_LOCATOR, so ['td'].map(browser.locator), which passes the index, needs map((selector) => browser.locator(selector)); the changeset says so.

Two fixes ride along, each with its own changeset:

  • An exact getByLabel(...) with a position and then a filter (.first().filter({ hasText })) lost the filter when used as a scope, a has, or now a within.
  • In e2e mcp's run_code, a screen locator and a browser locator could not be combined (or, filter({ has }), dragTo, within): INVALID_LOCATOR.

Why

Before this, a selector could not be scoped to a row except by writing one >> chain or switching to a getBy* query, so Playwright, Cypress (.find), and Selenium (findElement) ports had to be rewritten by hand. Passing { within } on main type-errors, and in JavaScript it is silently ignored: the selector searches the whole page.

How it works

  1. The engine contract's selector expression takes an optional scope, the field query already has (packages/core/src/engine/contract.ts:127). It already crosses the engine protocol as JSON, so the protocol does not change.
  2. EngineFixtureContext.expressionOf(api, locator) gives a fixture the expression behind a test's locator (packages/core/src/engine/index.ts:281, packages/core/src/run/fixtures.ts:563). It uses the ownership check filter({ has }) and or use, moved into ownedLocator (packages/core/src/locator/screen.ts:390), which now compares the engine session rather than the screen object. run_code builds its own screen over the attempt's session, so the old object check refused its locators next to browser's.
  3. browser.locator checks the options and mints { kind: 'selector', selector, scope } (packages/web/src/browser.ts:866). The web engine projects it as Playwright's scope.locator(selector) (packages/web/src/locators.ts:362), and frameSelectors follows scope so a framed within keeps its frame (packages/web/src/locators.ts:427).
  4. The same projection fixes the label bug: an exact label filtered after a position keeps the filter on its composable Playwright locator (packages/web/src/locators.ts:340).
  5. Other resolvers honor scope instead of silently matching the whole screen: core's resolveExpression runs the selector hook once over the scope's descendants (packages/core/src/engine/resolve.ts:210) and expressionSelectors lists the scope's selectors, so an engine that queries them first, as Electron does, answers the scope too (packages/core/src/engine/resolve.ts:91); mobile's resolver does the same (packages/mobile/src/locate.ts:57), and desktop's query-kind guard walks into it (packages/desktop/src/surface.ts:186). Error messages read getByRole("row", name: "Ada") >> locator("td.discount") (packages/core/src/locator/expression.ts:205).
  6. A frame's locator() refuses a second argument with INVALID_LOCATOR and points to browser.locator(selector, { within }) (packages/web/src/browser.ts:1427). No peer floor moves: @e2e-dev/web already needs @e2e-dev/core and e2e >=0.25.1 on main, the release expressionOf ships in.
  7. Docs: the locator entry in reference/web.mdx (semantics, order, that a >> nth= picks from the combined matches, throws, the closed shadow root limit, and that a frame's locator takes no options), reference/engine.mdx (scope, expressionOf, expressionSelectors), and the Playwright, Cypress, and Selenium guides, where locator.locator, .find('css'), and findElement move from the gap tables into the command maps. The consumer skill names within.

I checked the semantics against Playwright: matches come back once each in Playwright's order, scope match by scope match (with nested within matches that is not document order: :scope > .direct under nested articles returns the outer one's late before the inner one's early), a leading //, :scope, and xpath=.. start at the scope element, and a has locator runs from each candidate, so a scope that is the candidate itself matches nothing. scoped-selectors.test.ts runs every case through the engine and Playwright on one page. One limit Playwright has no answer for: Playwright cannot see into a closed shadow root at all, and our reader can, so li and xpath=./li work under a within found there, but a :scope combinator on the root's direct child matches nothing. The docs say so.

Overlap with open PRs: #1822 adds context.withNode(api, locator, use) beside expressionOf in the same files (expressionOf takes its argument order), a textual rebase. #1503 deletes locators.ts; after it, splitFrames and selectorParts need to follow scope, and the in-page resolver needs to run the selector under each scope match. scoped-selectors.test.ts is the check.

Verified

Ran it locally: yes

  • testbed, built CLI, a scratch test (not committed): within on a row in the page and on a row in an iframe, then fill and click through it:
 ✓ |web| tests/within-video.e2e.ts > within scopes a selector to one row, in the page and in a frame 536ms
      Tests  1 passed (1)

after

  • main against this branch, the same scratch test through each build's CLI:
Case main this PR
browser.locator('td.price', { within: graceRow }) within ignored: 2 matches, LOCATOR_AMBIGUOUS 1 match, $9
within a row inside an iframe searches the top page: LOCATOR_AMBIGUOUS finds $3 in the frame
no match locator matched no nodes within locator("td.discount") ... within getByRole("row", name: "Ada") >> locator("td.discount")
within: 'tr' (a string) accepted silently INVALID_LOCATOR: browser.locator({ within }) requires an e2e locator
  • run_code, mcp-run-code.test.ts, the new case with the ownership check as on main: INVALID_LOCATOR: or requires a locator made by this screen (and the same for within); passes here. The within line counts * under the list, 3, so it fails with 58 when the scope is dropped.

  • apps/testbed/tests/locator-query.e2e.ts, a Playwright port, rewrote div.first().locator('p') as a getByText scope; it now uses browser.locator('p', { within: browser.locator('div').first() }) and passes 19/19.

  • Gemini 4 Neon reviewed the design and the diff twice. Taken: the run_code bug, the label bug, the closed-root :scope limit (documented and pinned), test gaps. Declined: a protocol capability flag for scope (only the web fixture mints one and its engine ships in the same package; the contract says an engine must honor it). A runtime check on a frame's locator() was declined then and added after two reviewers asked for it.

  • expressionSelectors on { selector: 'td.price', scope: tr with .grace }: main's walk returns ['td.price'], so Electron never queries the scope and the locator matches nothing; the new case in resolve-expression.test.ts fails that way without the fix and returns ['tr', '.grace', 'td.price'] with it. scoped-selectors.test.ts adds li >> nth=0 under every ul, checked against Playwright: one element, a1.

  • pnpm check and the PR's suites on the rebased head: web 18, core/e2e 146, mobile 24, desktop 204, electron 253, all passing.

  • pnpm bench:ab on the web benchmark suite (no model calls): same steps and outcomes on both builds, no timing change.

bench:ab table

bench-ab: ea008c20 (merge base with origin/main) vs dba811ff

apps/web-benchmark: e2e run --workers 1. 6 pairs in random order, resolved after 6 pairs. Threshold ±5% and 10 ms. darwin arm64, Apple M4 x10, Node 26.13.1, load 4.5.

Behavior

Every test ran the same steps with the same outcome on every run of both builds.

Timings

Metric base median (IQR) head median (IQR) change (95% CI) verdict
wall (process) 61.10 s (60.88 s-61.47 s) 61.77 s (60.73 s-62.49 s) +1.2% (-1.5% to +2.9%) same
suite (sum of attempts) 59.81 s (59.49 s-60.07 s) 60.42 s (59.46 s-61.23 s) +1.2% (-1.5% to +3.1%) same
action (events) 31.05 s (30.88 s-31.21 s) 30.94 s (30.88 s-30.98 s) +0.1% (-2.2% to +0.5%) same
step screen.scrollUntilVisible 17.04 s (17.02 s-17.48 s) 17.02 s (17.01 s-17.04 s) -0.2% (-4.1% to +0.7%) same
step locator.tap 9.67 s (9.57 s-9.68 s) 9.70 s (9.61 s-9.75 s) +0.6% (-0.9% to +2.3%) same
step app.open 6.80 s (6.76 s-6.90 s) 6.74 s (6.70 s-6.86 s) -1.2% (-1.7% to +0.8%) same
step expect.toBeHidden 6.54 s (6.53 s-6.54 s) 6.53 s (6.53 s-6.54 s) -0.0% (-0.1% to +1.0%) same, under the floor
step expect.toBeExpanded 2.61 s (2.61 s-2.61 s) 2.61 s (2.61 s-2.62 s) -0.0% (-1.9% to +0.1%) same, under the floor
step expect.toHaveText 2.45 s (2.42 s-2.52 s) 2.39 s (2.33 s-2.43 s) -3.7% (-9.5% to +4.1%) unresolved
step expect.not.toContainText 2.01 s (2.01 s-2.01 s) 2.01 s (2.01 s-2.01 s) -0.1% (-0.1% to +0.2%) same, under the floor
step expect.not.toBeVisible 2.01 s (2.01 s-2.01 s) 2.01 s (2.01 s-2.01 s) -0.0% (-0.1% to +0.1%) same, under the floor
step locator.longPress 1.53 s (1.53 s-1.54 s) 1.53 s (1.53 s-1.53 s) -0.1% (-0.6% to +0.2%) same, under the floor
step expect.toContainText 1.20 s (1.20 s-1.20 s) 1.20 s (1.20 s-1.20 s) +0.2% (-0.4% to +0.3%) same, under the floor
step expect.not.toBeHidden 1.01 s (1.01 s-1.01 s) 1.01 s (1.01 s-1.01 s) -0.1% (-0.3% to +0.0%) same, under the floor
step locator.fill 925 ms (911 ms-934 ms) 937 ms (930 ms-948 ms) +2.0% (-0.9% to +2.9%) same
step locator.dragTo 690 ms (682 ms-697 ms) 676 ms (655 ms-710 ms) -3.6% (-6.2% to +6.8%) unresolved
step locator.check 296 ms (293 ms-301 ms) 290 ms (287 ms-295 ms) -1.2% (-9.7% to +0.7%) same, under the floor
step locator.pressSequentially 290 ms (289 ms-297 ms) 291 ms (288 ms-293 ms) +0.2% (-2.7% to +1.9%) same, under the floor
step expect.toBeVisible 280 ms (275 ms-285 ms) 283 ms (281 ms-285 ms) +1.6% (-2.3% to +3.9%) same, under the floor
step locator.hover 200 ms (196 ms-203 ms) 197 ms (193 ms-200 ms) -1.5% (-10.7% to +3.4%) same, under the floor
step screen.swipe 162 ms (153 ms-172 ms) 153 ms (148 ms-165 ms) -4.4% (-19.6% to +12.1%) same, under the floor
step expect.toHaveCount 145 ms (142 ms-146 ms) 139 ms (137 ms-145 ms) -2.4% (-4.5% to +0.3%) same, under the floor
step locator.secondaryTap 131 ms (128 ms-137 ms) 137 ms (128 ms-147 ms) +3.6% (-7.6% to +12.2%) same, under the floor
step locator.doubleTap 126 ms (122 ms-145 ms) 127 ms (124 ms-145 ms) +2.5% (-12.1% to +14.7%) same, under the floor
step browser.waitForDownload 122 ms (118 ms-123 ms) 118 ms (115 ms-121 ms) -0.8% (-5.3% to +2.6%) same, under the floor
step locator.setInputFiles 102 ms (98 ms-108 ms) 102 ms (98 ms-103 ms) -2.6% (-6.0% to +2.1%) same, under the floor
step locator.scrollIntoView 101 ms (99 ms-108 ms) 109 ms (105 ms-112 ms) +4.5% (-10.4% to +16.8%) same, under the floor
step locator.selectOption 91 ms (89 ms-95 ms) 90 ms (89 ms-91 ms) -1.7% (-14.8% to +3.4%) same, under the floor
step browser.waitForPopup 66 ms (65 ms-67 ms) 65 ms (64 ms-66 ms) -1.5% (-18.3% to +2.4%) same, under the floor
step expect.toHaveValue 52 ms (51 ms-53 ms) 51 ms (49 ms-51 ms) -3.8% (-11.7% to +0.0%) same, under the floor
step screen.tapAt 45 ms (42 ms-50 ms) 45 ms (41 ms-46 ms) -7.5% (-14.3% to +11.9%) same, under the floor
step expect.toHaveURL 44 ms (43 ms-45 ms) 42 ms (41 ms-43 ms) -5.7% (-29.3% to +1.2%) same, under the floor
step locator.uncheck 43 ms (34 ms-47 ms) 31 ms (31 ms-42 ms) -14.0% (-34.0% to +18.6%) same, under the floor
step browser.evaluate 34 ms (33 ms-39 ms) 32 ms (31 ms-32 ms) -8.9% (-21.0% to +9.9%) same, under the floor
step app.back 17 ms (16 ms-17 ms) 16 ms (15 ms-16 ms) -6.3% (-19.9% to 0.0%) same, under the floor
step browser.keyboard.press 10 ms (8 ms-12 ms) 9 ms (8 ms-10 ms) +0.0% (-38.5% to +43.6%) same, under the floor
step browser.keyboard.type 9 ms (8 ms-10 ms) 9 ms (8 ms-9 ms) -5.1% (-19.1% to +18.6%) same, under the floor
step locator.press 8 ms (7 ms-8 ms) 8 ms (7 ms-8 ms) 0.0% (-11.8% to +19.5%) same
step expect.toBeFocused 7 ms (7 ms-8 ms) 8 ms (6 ms-8 ms) +6.9% (-34.5% to +22.5%) same, under the floor
step expect.toBeDisabled 6 ms (6 ms-6 ms) 7 ms (6 ms-8 ms) +15.5% (-29.3% to +52.8%) same, under the floor
step expect.toHaveTitle 3 ms (3 ms-3 ms) 3 ms (2 ms-4 ms) 0.0% (-33.3% to +41.4%) same
step expect.toBeChecked 2 ms (2 ms-2 ms) 2 ms (1 ms-2 ms) -29.3% (-59.2% to 0.0%) same, under the floor
step expect.toBeEnabled 2 ms (1 ms-2 ms) 1 ms (1 ms-1 ms) -29.3% (-50.0% to +41.4%) same, under the floor
step tab.close 1 ms (1 ms-2 ms) 1 ms (1 ms-1 ms) 0.0% (-50.0% to +100.0%) same

Counters

Counter base head
events engine 842-846 843-849
events navigation 12-13 12
Tests outside the threshold: 0 of 95

With 95 tests compared at 95%, about 4.8 could land outside by chance.

The docs change is entries and table rows on pages pnpm docs:check compiles; no rendered screenshot.


Written by Claude Opus 5.5 in Claude Code (T3 Code), reviewed by Gemini 4 Neon (Antigravity).

within.webm

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • New Features

    • Added support for scoping browser selectors to another locator, including frame-backed locators.
    • Added support for combining screen and browser locators in code execution.
    • Improved scoped locator behavior across web, mobile, and desktop, including retaining label filters when used as a scope.
  • Bug Fixes

    • Invalid locator options now report clearer errors, and mixed-locator operations that previously failed now work.
  • Documentation

    • Updated migration guides and locator references with scoped selector examples and behavior.

@github-actions github-actions Bot added e2e team Opened by the e2e team size:L Up to 499 changed lines, not counting tests, fixtures, translated docs, or the lockfile labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e web: 130 passed

All 130 tests in 48 files
Test Time
🟢 tests/aria-hidden-flow.e2e.ts · 2 passed 722ms
🟢 aria hidden flow › picks the Pro plan by its visible text and confirms it 519ms
🟢 aria hidden flow › another plan shows the error and keeps the picker open 203ms
🟢 tests/async-states.e2e.ts · 2 passed 7.0s
🟢 async states › reads the code off the transient toast and verifies it once the button enables 2.3s
🟢 async states › a wrong code is rejected after the toast has gone 4.7s
🟢 tests/audit-log.e2e.ts · 3 passed 683ms
🟢 audit log › page 1 lists the ten newest events 124ms
🟢 audit log › page 2 starts at #36 and lists nine events, so #37 is on no page (planted bug) 195ms
🟢 audit log › the other pages match their footers 364ms
🟢 tests/canvas-only.e2e.ts · 2 passed 279ms
🟢 canvas only › taps square, circle, then diamond at their pixel coordinates 157ms
🟢 canvas only › a shape out of order paints the error and resets progress 122ms
🟢 tests/canvas-whiteboard.e2e.ts · 2 passed 406ms
🟢 canvas whiteboard › drags both shapes into their slots and saves 239ms
🟢 canvas whiteboard › bounces a shape off the wrong slot and refuses to save early 167ms
🟢 tests/card-fields.e2e.ts · 9 passed 3.7s
🟢 card fields › each field reformats, focus moves to the next frame, and Pay enables 471ms
🟢 card fields › another valid card with the same last four is distinguished without exposing full values 452ms
🟢 card fields › a wrong expiry or security code is reported independently 762ms
🟢 card fields › frame messages omit full card values and keep parent state minimized 447ms
🟢 card fields › the fields take no input before the page listens for their reports 542ms
🟢 card fields › a number that fails the checksum keeps Pay disabled 408ms
🟢 card fields › an expired date is refused in its frame 244ms
🟢 card fields › a card is still valid in its expiry month 240ms
🟢 card fields › the page cannot read inside the sandboxed frames 162ms
🟢 tests/cart-totals.e2e.ts · 2 passed 368ms
🟢 cart totals › increasing a quantity updates the line total but the order summary stays stale (planted bug) 221ms
🟢 cart totals › a quantity never drops below one 147ms
🟢 tests/checkout-review.e2e.ts · 1 passed 183ms
🟢 shows a raw greeting token and an undefined delivery date (planted bug), yet places the order 183ms
🟢 tests/context-menu-trap.e2e.ts · 2 passed 645ms
🟢 context menu trap › right-click opens nothing; the row menu renames the file 312ms
🟢 context menu trap › the decoy menu items refuse and keep the file 333ms
🟢 tests/control-inventory.e2e.ts · 8 passed 3.6s
🟢 control inventory › check sets the checkbox and the radio without flipping a set one 328ms
🟢 control inventory › check picks a radio the pick replaces with its summary 200ms
🟢 control inventory › a long press and a double click are told apart from a tap 1.0s
🟢 control inventory › the file menu opens on right-click only and Rename renames the file 255ms
🟢 control inventory › setInputFiles attaches files named from the project root 157ms
🟢 control inventory › the details view is left through the browser history 216ms
🟢 control inventory › scrollIntoView brings the footnote into view 196ms
🟢 control inventory › every exercise done shows the success message 1.2s
🟢 tests/css-content-ui.e2e.ts · 2 passed 376ms
🟢 css content ui › the tile labelled Ship it advances and confirming ships 226ms
🟢 css content ui › a wrong tile shows the CSS-rendered error and keeps the picker 150ms
🟢 tests/date-picker.e2e.ts · 2 passed 645ms
🟢 date picker › navigates three months ahead and books the required date 396ms
🟢 date picker › confirming without the exact date shows the error 249ms
🟢 tests/debounced-search.e2e.ts · 2 passed 2.8s
🟢 debounced search › a decoy one character off is refused 1.4s
🟢 debounced search › picking the exact item adds it to the cart 1.4s
🟢 tests/deferred-dialog.e2e.ts · 1 passed 1.1s
🟢 one submit opens one confirm, even when double-clicked 1.1s
🟢 tests/div-soup.e2e.ts · 2 passed 739ms
🟢 div soup › a wrong code is rejected 354ms
🟢 div soup › the right code grants access after the delete tile fixes a typo 385ms
🟢 tests/drag-and-drop.e2e.ts · 2 passed 734ms
🟢 drag and drop › an out-of-order item resets the dropzone 374ms
🟢 drag and drop › dropping Banana then Cherry passes 360ms
🟢 tests/file-round-trip.e2e.ts · 2 passed 425ms
🟢 file round trip › downloads the issued voucher and verifies the same file uploaded back 227ms
🟢 file round trip › rejects a file that is not the voucher, then accepts the issued one 198ms
🟢 tests/filter-deep-link.e2e.ts · 2 passed 286ms
🟢 filter deep link › filtering writes the query to the URL 148ms
🟢 filter deep link › opening a shared link restores the filter 138ms
🟢 tests/gift-card-purchase.e2e.ts · 3 passed 630ms
🟢 gift card purchase › refuses to buy without an amount 196ms
🟢 gift card purchase › refuses a recipient without an at sign 212ms
🟢 gift card purchase › sends the gift card 222ms
🟢 tests/hover-menu.e2e.ts · 2 passed 581ms
🟢 hover menu › a decoy leaf is refused 270ms
🟢 hover menu › hovering Account, then Billing, reaches Redeem voucher 311ms
🟢 tests/iframe-form.e2e.ts · 2 passed 572ms
🟢 iframe form › a wrong code is refused by the host page 292ms
🟢 iframe form › the code read from one frame applies through the other 280ms
🟢 tests/image-only-ui.e2e.ts · 3 passed 515ms
🟢 image only ui › the icons have no names, so the bare svg locator is ambiguous 114ms
🟢 image only ui › a wrong icon shows the error image and keeps the icons 186ms
🟢 image only ui › tapping the star, then the heart, verifies the icons 215ms
🟢 tests/infinite-scroll.e2e.ts · 1 passed 2.8s
🟢 scrolls the feed until the Golden Ticket loads, then claims it 2.8s
🟢 tests/kanban-board.e2e.ts · 3 passed 759ms
🟢 kanban board › pointer drags move both cards into the goal layout 393ms
🟢 kanban board › a swipe along a path drags a card as well 150ms
🟢 kanban board › a plain tap moves nothing and the untouched board is rejected 216ms
🟢 tests/login-form.e2e.ts · 4 passed 833ms
🟢 login form › rejects a malformed email 198ms
🟢 login form › rejects a short password 204ms
🟢 login form › rejects an unknown account 194ms
🟢 login form › signs in and logs out 237ms
🟢 tests/lying-labels.e2e.ts · 4 passed 744ms
🟢 lying labels › the button whose accessible name says Pay now is the wrong one 147ms
🟢 lying labels › a text match for Pay now catches the decoy phrase too 117ms
🟢 lying labels › the field whose accessible name says Amount is the wrong one 247ms
🟢 lying labels › visible text drives the payment through 233ms
🟢 tests/native-dialogs.e2e.ts · 3 passed 452ms
🟢 native dialogs › answers the confirm, prompt, and alert chain 149ms
🟢 native dialogs › dismissing the confirm cancels the order 149ms
🟢 native dialogs › a wrong gift code is rejected 154ms
🟢 tests/new-tab-flow.e2e.ts · 2 passed 480ms
🟢 new tab flow › reads the code in the tab the app opens and enters it back in the original tab 258ms
🟢 new tab flow › a tap that opens a tab leaves the screen on the original tab, and activate shows the new one 222ms
🟢 tests/newsletter-signup.e2e.ts · 1 passed 184ms
🟢 subscribe renders no feedback and logs a TypeError (planted bug) 184ms
🟢 tests/onboarding-wizard.e2e.ts · 5 passed 5.0s
🟢 onboarding wizard › back keeps what was typed and the brief comes back with it 311ms
🟢 onboarding wizard › the address step takes the brief through its bare-div dropdown 350ms
🟢 onboarding wizard › the profile step steers the calendar three decades back 1.3s
🟢 onboarding wizard › the preferences step flips the toggles the brief names and leaves the trap off 1.5s
🟢 onboarding wizard › the review step repeats the brief and finishes with the PIN 1.5s
🟢 tests/order-history.e2e.ts · 2 passed 1.5s
🟢 order history › overview and settings render their panels 225ms
🟢 order history › the orders tab never leaves its loading state (planted bug) 1.2s
🟢 tests/otp-auto-advance.e2e.ts · 3 passed 1.4s
🟢 otp auto-advance › focus advances with each digit and the full code verifies 488ms
🟢 otp auto-advance › backspace on an empty box clears and refocuses the previous one 162ms
🟢 otp auto-advance › a wrong code clears every box and starts over 779ms
🟢 tests/overlay-trap.e2e.ts · 1 passed 632ms
🟢 continues only after the banner and the overlay are gone 632ms
🟢 tests/playbook-cleanup.e2e.ts · 2 passed 567ms
🟢 playbook cleanup › deleting the draft removes it from an exact-name search 301ms
🟢 playbook cleanup › cancelling the dialog keeps the draft searchable 266ms
🟢 tests/price-sorting.e2e.ts · 3 passed 438ms
🟢 price sorting › opens in the featured order with sale prices struck through 122ms
🟢 price sorting › low to high sorts by the original price, not the paid one (planted bug) 161ms
🟢 price sorting › high to low is the same wrong order reversed (planted bug) 155ms
🟢 tests/product-reviews.e2e.ts · 1 passed 145ms
🟢 the running-shoe page lists coffee-grinder reviews (planted bug) 145ms
🟢 tests/profile-settings.e2e.ts · 3 passed 820ms
🟢 profile settings › the time zone is saved: the public profile and a reload show it 304ms
🟢 profile settings › an empty name is refused 194ms
🟢 profile settings › a saved name shows in the header but not on the public profile or after a reload (planted bug) 322ms
🟢 tests/promo-storefront.e2e.ts · 1 passed 1.3s
🟢 buys a deal once the promo chrome is out of the way 1.3s
🟢 tests/rich-text-editor.e2e.ts · 2 passed 566ms
🟢 rich text editor › bolding exactly the required word passes the check 257ms
🟢 rich text editor › bold that spills into the previous word fails the check 309ms
🟢 tests/saved-addresses.e2e.ts · 3 passed 669ms
🟢 saved addresses › adds an address and clears the form 217ms
🟢 saved addresses › ignores an add with an empty field 213ms
🟢 saved addresses › delete shows its toast but keeps the address, on retry too (planted bug) 239ms
🟢 tests/shadow-dom-form.e2e.ts · 2 passed 434ms
🟢 shadow DOM form › rejects a wrong access code 216ms
🟢 shadow DOM form › grants access with the code from the hint inside the root 218ms
🟢 tests/smoke.e2e.ts · 1 passed 275ms
🟢 home lists the scenarios and opens one 275ms
🟢 tests/stale-dom.e2e.ts · 1 passed 2.2s
🟢 taps the moving target three times across rebuilds of the list 2.2s
🟢 tests/sticky-chrome.e2e.ts · 1 passed 235ms
🟢 accepts the terms once the button clears the sticky footer 235ms
🟢 tests/support-refund.e2e.ts · 15 passed 5.6s
🟢 support refund › the injected instructions are on the page 152ms
🟢 support refund › a full refund with no other change succeeds 295ms
🟢 support refund › the amount the alt text asks for is refused and counted 298ms
🟢 support refund › a partial refund is refused without counting 282ms
🟢 support refund › an amount that is not in the format the inbox prints is refused without counting 565ms
🟢 support refund › the store credit the message asks for is counted 266ms
🟢 support refund › following an injection blocks the success state even after the right refund 368ms
🟢 support refund › an unrequested action still counts after the scenario is opened again 448ms
🟢 support refund › a refund still counts after the scenario is opened again 560ms
🟢 support refund › traps still block success when storage is blocked 412ms
🟢 support refund › an action before the restore adds to the saved record 438ms
🟢 support refund › the restore keeps an earlier action when storage is blocked 381ms
🟢 support refund › a refund on another ticket is not the task 311ms
🟢 support refund › a refund on another ticket first keeps success away after the right refund 481ms
🟢 support refund › a second refund on the right ticket keeps success away 351ms
🟢 tests/team-directory.e2e.ts · 5 passed 982ms
🟢 team directory › two members share the name and every row has the same button names 116ms
🟢 team directory › suspends the member the open alert names, matched by the email column 188ms
🟢 team directory › the first match by name is the wrong member 184ms
🟢 team directory › undoing a wrong change restores the success path 293ms
🟢 team directory › removing a member asks first and counts as a change 201ms
🟢 tests/virtualized-table.e2e.ts · 1 passed 15.6s
🟢 scrolls the windowed table to the Golden Row and claims it 15.6s
🟢 tests/wishlist.e2e.ts · 2 passed 634ms
🟢 wishlist › saving toggles the button and the tab badge 281ms
🟢 wishlist › the wishlist tab renders the empty state despite the badge count (planted bug) 353ms

Tested by e2e 0.26.0 · 1m 13s · web · run artifacts

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e web agent: 34 passed, 5 skipped

35 agent steps · 26 replayed from cache · 25 model calls · 133.5k tokens (94% cached) · $0.0054

All 39 tests in 5 files
Test Agent Time
⏭️ tests-agent/planted-bugs.e2e.ts · 3 passed, 2 skipped 4 steps · 8 calls 10.7s
🟢 cart totals: a judgment catches the stale order summary 2 steps · 4 calls 5.3s
🟢 checkout review: a judgment catches the broken copy 1 step · 1 call 1.4s
🟢 wishlist: a judgment catches the lost saved items 1 step · 3 calls 4.0s
⏭️ profile settings: a judgment catches the name that was never stored and passes the time zone that was (skipped: not run with a model yet: remove this skip, pass it in a keyed test:agent run, and commit the recordings of its act steps, if it has any)
⏭️ audit log: a judgment catches the event missing from page 2 and passes a page that matches its footer (skipped: not run with a model yet: remove this skip, pass it in a keyed test:agent run, and commit the recordings of its act steps, if it has any)
⏭️ tests-agent/scenarios.e2e.ts · 22 passed, 3 skipped 22 steps · 17 calls 1m 9s
🟢 act completes shadow-dom-form 1 step · 3 calls 3.1s
🟢 act completes lying-labels 1 step · 3 calls 3.4s
🟢 act completes iframe-form 1 step · 3 calls 3.2s
🟢 act completes infinite-scroll 1 step 3.3s
🟢 act completes virtualized-table 1 step 16.8s
🟢 act completes overlay-trap 1 step 862ms
🟢 act completes sticky-chrome 1 step 836ms
🟢 act completes async-states 1 step · 3 calls 6.3s
🟢 act completes debounced-search 1 step 2.3s
🟢 act completes hover-menu 1 step 569ms
🟢 act completes drag-and-drop 1 step 526ms
🟢 act completes kanban-board 1 step 735ms
🟢 act completes context-menu-trap 1 step 2.7s
🟢 act completes stale-dom 1 step 499ms
🟢 act completes otp-auto-advance 1 step 802ms
🟢 act completes date-picker 1 step 937ms
🟢 act completes rich-text-editor 1 step 10.3s
🟢 act completes playbook-cleanup 1 step 692ms
🟢 act completes promo-storefront 1 step 1.3s
🟢 act completes new-tab-flow 1 step · 5 calls 7.5s
🟢 act completes gift-card-purchase 1 step 2.4s
⏭️ act completes card-fields (skipped: not run with a model yet: remove this skip, pass it in a keyed test:agent run, and commit the recordings of its act steps, if it has any)
⏭️ act completes team-directory (skipped: not run with a model yet: remove this skip, pass it in a keyed test:agent run, and commit the recordings of its act steps, if it has any)
🟢 act filters the list and the URL carries the filter 1 step 198ms
⏭️ act refunds the ticket without following the instructions inside it (skipped: not run with a model yet: remove this skip, pass it in a keyed test:agent run, and commit the recordings of its act steps, if it has any)
🟢 tests-agent/control-inventory.e2e.ts · 7 passed 7 steps 7.6s
🟢 control inventory › check sets the checkbox and the radio 1 step 859ms
🟢 control inventory › check picks a radio the pick replaces with its summary 1 step 297ms
🟢 control inventory › a long press and a double click are chosen over a plain tap 1 step 927ms
🟢 control inventory › a right-click opens the file menu and Rename renames the file 1 step 2.6s
🟢 control inventory › upload attaches the named project files 1 step 2.3s
🟢 control inventory › back returns from the details view to the inventory 1 step 240ms
🟢 control inventory › scroll_to brings the footnote into view 1 step 355ms
🟢 tests-agent/login-form.e2e.ts · 1 passed 1 step 348ms
🟢 act signs in with the benchmark account 1 step 348ms
🟢 tests-agent/unique-cache.e2e.ts · 1 passed 1 step 251ms
🟢 act adds an address with a run-unique label 1 step 251ms

Tested by e2e 0.26.0 · 1m 29s · web · run artifacts

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e android agent: 20 passed

24 agent steps · 15 replayed from cache · 43 model calls · 300.5k tokens (85% cached) · $0.0188

All 20 tests in 1 file
Test Agent Time
🟢 tests-agent/scenarios.e2e.ts · 20 passed 24 steps · 43 calls 5m 34s
🟢 act completes Login Form 1 step 22.0s
🟢 act completes Infinite Scroll List 1 step 19.8s
🟢 act completes Modal Flow 1 step 11.2s
🟢 act completes Bottom Tabs 1 step 7.4s
🟢 act completes Text Input Variations 1 step 7.1s
🟢 act completes Broken Accessibility 2 steps · 5 calls 11.2s
🟢 act completes Vision Only 2 steps · 1 call 6.0s
🟢 act completes Gestures 1 step · 9 calls 20.6s
🟢 act completes Async States 1 step · 17 calls 31.6s
🟢 act completes Debounced Search 1 step 6.8s
🟢 act completes Huge Virtualized List 1 step 1m 49s
🟢 act completes Flattened Registration Form 2 steps · 1 call 7.6s
🟢 act completes Flattened Login 2 steps · 6 calls 12.4s
🟢 act completes Sticky Chrome Target 1 step 8.8s
🟢 act completes WebView Accessibility 1 step · 4 calls 11.8s
🟢 act completes Permission Prompt 1 step 6.0s
🟢 act completes Product Catalog 1 step 8.1s
🟢 act completes Error Recovery 1 step 8.7s
🟢 act completes Choice Controls 1 step 8.3s
🟢 act completes Sequential Onboarding 1 step 9.5s

Tested by e2e 0.26.0 · 5m 35s · android-emulator · run artifacts

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Microbenchmarks

For 1a8437618aaa, the pull request's head, measured merged into its base.

⚪ No case changed by 0.5% or more.

Repeatability: two builds of the head agree in every case, 10 trials each.

Base 4fec2de67ae8, head a0bc8fd9c899.

A direction is reported only when the trial ranges of base and head do not overlap and the change is at least 0.5%.

4 unchanged cases
Case Mode Base Head Change Direction Base spread Head spread
redact/screen-text jitless 789,683 789,668 -0.002% ⚪ same (ranges overlap, change under 0.5%) 0.029% 0.010%
redact/fragments jitless 467,942,751 467,955,389 +0.003% ⚪ same (ranges overlap, change under 0.5%) 0.021% 0.023%
locate/catalog jitless 51,699,167 51,699,774 +0.001% ⚪ same (ranges overlap, change under 0.5%) 0.017% 0.022%
mobile/project-snapshot jitless 144,277,368 144,260,903 -0.011% ⚪ same (ranges overlap, change under 0.5%) 0.086% 0.093%
How this is measured

Instructions 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.

  • jitless: node --jitless --predictable --single-threaded --predictable-gc-schedule --random-seed=42 --hash-seed=42 --expose-gc --v8-pool-size=0 --no-memory-protection-keys

Workflow run: each job's summary, and result.json in its artifact.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e ios: 67 passed, 1 skipped

All 68 tests in 8 files
Test Time
⏭️ tests/controls.e2e.ts · 25 passed, 1 skipped 3m 1s
🟢 control inventory › a label query resolves a labeled text field 14.8s
🟢 control inventory › a labeled field answers name, display value, value reads, fill, and clear 14.3s
🟢 control inventory › a placeholder query and attribute reads find the field 5.4s
🟢 control inventory › getAttribute reads the label, resource id, and class an Appium suite asks for 5.6s
🟢 control inventory › a secure field takes a fill and denies value reads 7.7s
🟢 control inventory › press sends a character and Enter through the soft keyboard 9.4s
🟢 control inventory › a field autofocuses on mount and focus() moves the focus 10.0s
🟢 control inventory › toBeFocused follows the focus 7.8s
🟢 control inventory › a switch checks, unchecks, and reports its state 8.6s
🟢 control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap 8.3s
🟢 control inventory › checkbox and radio roles check, uncheck, and report their state 9.2s
🟢 control inventory › a radio group reports the checked option 8.1s
🟢 control inventory › buttons report disabled, enabled, and a state that arrives later 7.8s
🟢 control inventory › a display: none element is absent rather than hidden, its visible twin attached 6.0s
🟢 control inventory › a header answers its accessible name 4.2s
🟢 control inventory › a tab row answers count, all, texts, filters, positions, and switching 5.6s
🟢 control inventory › a list answers counts, list-form text, reads, and boxes in order 5.9s
⏭️ control inventory › a row contains its texts (skipped: React Native flattens a plain View out of the accessibility tree on both platforms: XCTest and the Android helper report a View with a testID as a leaf beside its children, so filter({ has }) and a query scoped to it match nothing; only Sc…)
🟢 control inventory › a long press lands as one 8.3s
🟢 control inventory › tap({ count: 3 }) lands three presses 7.7s
🟢 control inventory › pointer verbs land at the point asked for 8.3s
🟢 control inventory › an ambiguous locator fails at once 5.0s
🟢 control inventory › screenshot, restart, and clearState reopen the app on its home list 11.3s
🟢 refusals › verbs a device never declares are refused before the engine 2ms
🟢 refusals › keys the soft keyboard cannot send are refused by the engine 150ms
🟢 refusals › a missing locator fails as not found once its timeout passes 1.1s
🟢 tests/device-fixture.e2e.ts · 15 passed 2m 13s
🟢 device fixture › setAppearance flips the color scheme the app reads 15.6s
🟢 device fixture › setOrientation rotates the window and viewport dimensions 6.9s
🟢 device fixture › the clipboard reads back what was written 5.3s
🟢 device fixture › home leaves the app, openApp brings it back where it was 7.4s
🟢 device fixture › closeApp then openApp relaunches on the home list 10.0s
🟢 device fixture › closeApp leaves the next commands on the same device 13.7s
🟢 device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN 7.3s
🟢 device fixture › openLink opens the scenario a deep link names 14.3s
🟢 device fixture › isAppInstalled finds the app under test and no app that is absent 7.0s
🟢 device fixture › uninstallApp removes the app until installApp puts it back 10.6s
🟢 device fixture › device.back pops the scenario 5.8s
🟢 device fixture › unstable_raw reaches the test session through the raw driver 4.7s
🟢 device fixture › setLocation and clearLocation change what the app reads 10.3s
🟢 device fixture › enrollBiometrics and setBiometrics answer a biometric prompt 10.3s
🟢 device fixture › pressButton is refused on an iOS simulator 3.5s
🟢 tests/device.e2e.ts · 7 passed 1m 16s
🟢 permissions all grants the microphone without a system dialog 10.7s
🟢 sequential onboarding echoes the exact values 23.8s
🟢 isKeyboardShown follows the keyboard up and through a dismissal 7.2s
🟢 a control under the keyboard reads hidden and refuses a tap until the keyboard is dismissed 9.6s
🟢 a shake is sent without an error and leaves the screen readable 5.0s
🟢 onboarding rejects a malformed email before advancing 9.4s
🟢 dismissing the keyboard over choice controls leaves them as they were 10.3s
🟢 tests/flows-lists.e2e.ts · 7 passed 3m 56s
🟢 infinite scroll reaches the target item 31.6s
🟢 product catalog adds exactly two of the right variant 10.0s
🟢 gestures: long-press, then swipe left 8.8s
🟢 sticky chrome: accept below the fold, then continue 12.8s
🟢 async states: load, pull to refresh, claim through the toast 11.3s
🟢 huge virtualized list reaches row 512 2m 30s
🟢 web view coupon form applies the code shown on the page 11.9s
🟢 tests/flows.e2e.ts · 7 passed 1m 7s
🟢 text inputs unlock the submit button 12.2s
🟢 filled text inputs report their values 10.4s
🟢 modal flow confirms through the native alert 10.1s
🟢 bottom tabs act inside the last tab 7.3s
🟢 error recovery retries, then confirms the delete 9.2s
🟢 choice controls place the exact order 6.9s
🟢 debounced search selects the target once results arrive 11.2s
🟢 tests/login-form.e2e.ts · 3 passed 44.3s
🟢 login form › rejects a malformed email 12.3s
🟢 login form › rejects an unknown account 13.1s
🟢 login form › signs in and logs out 18.9s
🟢 tests/scroll-to.e2e.ts · 2 passed 2m 39s
🟢 screen.scrollTo reaches the last row of the list and comes back to the first 1m 41s
🟢 locator.scrollTo scrolls the list it names 58.6s
🟢 tests/smoke.e2e.ts · 1 passed 6.8s
🟢 home lists the scenarios and opens one 6.8s

Tested by e2e 0.26.0 · 8m 1s · ios-simulator · run artifacts

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e android: 68 passed, 1 skipped

All 69 tests in 8 files
Test Time
⏭️ tests/controls.e2e.ts · 26 passed, 1 skipped 2m 36s
🟢 control inventory › a label query resolves a labeled text field 18.8s
🟢 control inventory › a labeled field answers name, display value, value reads, fill, and clear 10.7s
🟢 control inventory › a placeholder query and attribute reads find the field 6.5s
🟢 control inventory › getAttribute reads the label, resource id, and class an Appium suite asks for 5.3s
🟢 control inventory › a secure field takes a fill and denies value reads 6.2s
🟢 control inventory › press sends a character and Enter through the soft keyboard 6.5s
🟢 control inventory › a field autofocuses on mount and focus() moves the focus 7.4s
🟢 control inventory › toBeFocused follows the focus 6.3s
🟢 control inventory › a switch checks, unchecks, and reports its state 6.3s
🟢 control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap 6.4s
🟢 control inventory › checkbox and radio roles check, uncheck, and report their state 7.0s
🟢 control inventory › a tab role answers getByRole 3.6s
🟢 control inventory › a radio group reports the checked option 6.4s
🟢 control inventory › buttons report disabled, enabled, and a state that arrives later 6.8s
🟢 control inventory › a display: none element is absent rather than hidden, its visible twin attached 5.2s
🟢 control inventory › a header answers its accessible name 3.8s
🟢 control inventory › a tab row answers count, all, texts, filters, positions, and switching 5.1s
🟢 control inventory › a list answers counts, list-form text, reads, and boxes in order 5.1s
⏭️ control inventory › a row contains its texts (skipped: React Native flattens a plain View out of the accessibility tree on both platforms: XCTest and the Android helper report a View with a testID as a leaf beside its children, so filter({ has }) and a query scoped to it match nothing; only Sc…)
🟢 control inventory › a long press lands as one 6.8s
🟢 control inventory › a double tap lands inside the 300 ms window 6.5s
🟢 control inventory › tap({ count: 3 }) lands three presses 6.2s
🟢 control inventory › an ambiguous locator fails at once 4.7s
🟢 control inventory › screenshot, restart, and clearState reopen the app on its home list 6.0s
🟢 refusals › verbs a device never declares are refused before the engine 3ms
🟢 refusals › keys the soft keyboard cannot send are refused by the engine 1.7s
🟢 refusals › a missing locator fails as not found once its timeout passes 1.0s
🟢 tests/device-fixture.e2e.ts · 14 passed 1m 25s
🟢 device fixture › setOrientation rotates the window and viewport dimensions 4.6s
🟢 device fixture › home leaves the app, openApp brings it back where it was 3.6s
🟢 device fixture › foregroundApp sees the home screen after home() 3.3s
🟢 device fixture › closeApp then openApp relaunches on the home list 5.4s
🟢 device fixture › closeApp leaves the next commands on the same device 5.6s
🟢 device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN 3.8s
🟢 device fixture › openLink opens the scenario a deep link names 3.9s
🟢 device fixture › isAppInstalled finds the app under test and no app that is absent 3.3s
🟢 device fixture › uninstallApp removes the app until installApp puts it back 6.4s
🟢 device fixture › device.back pops the scenario 3.8s
🟢 device fixture › unstable_raw reaches the test session through the raw driver 3.6s
🟢 device fixture › setNetwork and setAirplaneMode change what the app sees 14.2s
🟢 device fixture › setLocation and clearLocation change what the app reads 16.5s
🟢 device fixture › pressButton shows the volume panel on Android 7.3s
🟢 tests/device.e2e.ts · 8 passed 52.3s
🟢 permission prompt › allowing the system dialog enables the microphone 5.2s
🟢 permission prompt › a denied prompt recovers once the permission is granted outside 11.6s
🟢 permissions all grants the microphone without a system dialog 5.9s
🟢 sequential onboarding echoes the exact values 9.0s
🟢 a shake is sent without an error and leaves the screen readable 4.1s
🟢 a lock and an unlock both complete and leave the app readable 5.1s
🟢 onboarding rejects a malformed email before advancing 5.0s
🟢 dismissing the keyboard over choice controls leaves them as they were 6.4s
🟢 tests/flows-lists.e2e.ts · 7 passed 3m 3s
🟢 infinite scroll reaches the target item 28.0s
🟢 product catalog adds exactly two of the right variant 8.1s
🟢 gestures: long-press, then swipe left 7.4s
🟢 gestures: double-tap completes the flow 9.2s
🟢 sticky chrome: accept below the fold, then continue 10.2s
🟢 async states: load, pull to refresh, claim through the toast 11.8s
🟢 huge virtualized list reaches row 512 1m 49s
🟢 tests/flows.e2e.ts · 7 passed 47.6s
🟢 text inputs unlock the submit button 6.0s
🟢 filled text inputs report their values 5.4s
🟢 modal flow confirms through the native alert 8.8s
🟢 bottom tabs act inside the last tab 6.3s
🟢 error recovery retries, then confirms the delete 8.2s
🟢 choice controls place the exact order 5.1s
🟢 debounced search selects the target once results arrive 7.9s
🟢 tests/login-form.e2e.ts · 3 passed 24.6s
🟢 login form › rejects a malformed email 6.6s
🟢 login form › rejects an unknown account 6.6s
🟢 login form › signs in and logs out 11.4s
🟢 tests/scroll-to.e2e.ts · 2 passed 1m 5s
🟢 screen.scrollTo reaches the last row of the list and comes back to the first 40.4s
🟢 locator.scrollTo scrolls the list it names 24.4s
🟢 tests/smoke.e2e.ts · 1 passed 5.3s
🟢 home lists the scenarios and opens one 5.3s

Tested by e2e 0.26.0 · 10m 21s · android-emulator · run artifacts

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🔴 e2e ios agent: 5 failed, 16 passed, 1 skipped

24 agent steps · 12 replayed from cache · 31 model calls · 174.0k tokens (87% cached) · $0.0098

🔴 act completes Flattened Registration Form
tests-agent/scenarios.e2e.ts:365

MODEL_PROVIDER_FAILED

model provider failed: AI Gateway requires a positive credit balance for all requests (including BYOK requests). Buy AI Gateway Credit at https://vercel.com/e2e-inc/~/ai-gateway?modal=top-up.

  • Failed the same way on both attempts: MODEL_PROVIDER_FAILED.
  • Screen: dev.e2e.benchmark / Flattened Registration Form

Evidence: screenshot, log

🔴 act completes Flattened Login
tests-agent/scenarios.e2e.ts:359

MODEL_PROVIDER_FAILED

the model provider failed: AI Gateway requires a positive credit balance for all requests (including BYOK requests). Buy AI Gateway Credit at https://vercel.com/e2e-inc/~/ai-gateway?modal=top-up.

  • Failed the same way on both attempts: MODEL_PROVIDER_FAILED.
  • Screen: dev.e2e.benchmark / Flattened Login

Evidence: screenshot, log

🔴 act completes Photo Picker
tests-agent/scenarios.e2e.ts:359

MODEL_PROVIDER_FAILED

the model provider failed: AI Gateway requires a positive credit balance for all requests (including BYOK requests). Buy AI Gateway Credit at https://vercel.com/e2e-inc/~/ai-gateway?modal=top-up.

  • Failed the same way on both attempts: MODEL_PROVIDER_FAILED.
  • Screen: dev.e2e.benchmark

Evidence: screenshot, log

🔴 act completes Choice Controls
tests-agent/scenarios.e2e.ts:359

MODEL_PROVIDER_FAILED

the model provider failed: AI Gateway requires a positive credit balance for all requests (including BYOK requests). Buy AI Gateway Credit at https://vercel.com/e2e-inc/~/ai-gateway?modal=top-up.

  • Failed the same way on both attempts: MODEL_PROVIDER_FAILED.
  • Screen: dev.e2e.benchmark / Choice Controls

Evidence: screenshot, log

🔴 act completes Stripe PaymentSheet
tests-agent/scenarios.e2e.ts:359

MODEL_PROVIDER_FAILED

the model provider failed: AI Gateway requires a positive credit balance for all requests (including BYOK requests). Buy AI Gateway Credit at https://vercel.com/e2e-inc/~/ai-gateway?modal=top-up.

  • Failed the same way on both attempts: MODEL_PROVIDER_FAILED.
  • Screen: dev.e2e.benchmark / Stripe PaymentSheet

Evidence: screenshot, log

All 22 tests in 1 file
Test Agent Time
🔴 tests-agent/scenarios.e2e.ts · 5 failed, 16 passed, 1 skipped 24 steps · 31 calls 6m 26s
🟢 act completes Login Form 1 step 38.1s
🟢 act completes Infinite Scroll List 1 step 32.6s
🟢 act completes Modal Flow 1 step 9.3s
🟢 act completes Bottom Tabs 1 step 7.0s
🟢 act completes Text Input Variations 1 step 11.5s
🟢 act completes Broken Accessibility 2 steps · 6 calls 20.1s
🟢 act completes Vision Only 2 steps · 6 calls 25.0s
🟢 act completes Gestures 1 step · 7 calls 26.0s
🟢 act completes Async States 1 step · 10 calls 25.8s
🟢 act completes Debounced Search 1 step · 1 call 26.8s
🔴 act completes Flattened Registration Form 2 steps · 1 call 26.7s
🔴 act completes Flattened Login 1 step 7.9s
🟢 act completes Sticky Chrome Target 1 step 14.0s
🟢 act completes WebView Accessibility 1 step 11.3s
🟢 act completes Permission Prompt 1 step 9.9s
🔴 act completes Photo Picker 1 step 23.5s
🟢 act completes Product Catalog 1 step 11.3s
🟢 act completes Error Recovery 1 step 10.5s
🔴 act completes Choice Controls 1 step 24.2s
🔴 act completes Stripe PaymentSheet 1 step 7.3s
🟢 act completes Apple Pay 1 step 17.0s
⏭️ 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.26.0 · 7m 50s · ios-simulator · run artifacts

@KrzysztofMoch KrzysztofMoch added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 26, 2026

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated review (AI triage pass), not yet read by a maintainer.

Reviewed a702e40ec. Clean, well-tested addition: { kind: 'selector', scope } is projected as Playwright's own scope.locator(selector), every expression walker (web projection, frameSelectors, core resolveExpression, mobile, desktop guard, describeExpression) handles the new field, and the docs, skill, changesets, type test, and peer floor all match the code. No must-fix.

Verified locally (fresh worktree, full build):

  • scoped-selectors.test.ts 11/11, frame-screen.test.ts, e2e expression / resolve-expression / fixture-runtime (96), mobile locate (21), desktop surface (175), web tsc --noEmit (covers tests/types/locator-within.ts), mcp-run-code "mixes the code's screen..." all pass.
  • Mutation checks, each fails the new test: dropping the composable.filter(filter) label fix (expected [ 'billing-v' ] to deeply equal []), restoring case 'selector': return [] in frameSelectors (frame case), restoring the internals.context !== context ownership check (run_code case fails with INVALID_LOCATOR).
  • Only the Playwright driver exists on main (#1503 not merged), and the projection is plain Playwright chaining, so Chromium, Firefox, and WebKit behave alike. The PR body already names what #1503 must carry over.

Should fix

  1. packages/web/src/browser.ts:1426 - frame.locator(selector) still drops a second argument without a word. In JavaScript, browser.frameLocator('#grid').locator('td', { within: row }) searches the whole frame. That is the same silent-ignore this PR fixes for browser.locator, and now the API invites the call. Take options?: unknown and refuse anything other than undefined with INVALID_LOCATOR, naming the fix (browser.locator(sel, { within }), where the within locator carries its frame). The PR body turned down a runtime arity check because "no fixture method checks arity", but rejectUnknownOptions exists because of the policy in options.ts:1-6.

Nits

  1. packages/core/src/locator/screen.ts:379 - ownership now compares sessions, so a locator kept from an earlier test in a serial group or another test on a shared session (serial.ts:417, suite-attempt.ts:214) is accepted. That is harmless because only the expression is reused, but the message, the expressionOf JSDoc (engine/index.ts:278), and the engine.mdx:2436 row still say "another attempt" is refused. Say "another engine session" instead.

For the maintainer

  1. API shape: Playwright chains row.locator(css), and its locator(sel, options) bag takes has/hasNot/hasText/hasNotText, not within. This PR puts a new key, within, into that same options position on browser.locator. So a Playwright port gets INVALID_LOCATOR ... it takes within for hasText, and must turn row.locator('td') inside out. The PR says ENG-1211 chose web-only with no locator() on the shared Locator (the type test pins this). Please confirm { within } over a web-only chaining method (for example browser.within(row).locator(css)) before this becomes public API.
  2. The @e2e-dev/web peer floor rises to >=0.25.1 for @e2e-dev/core and e2e. That fits only if the next core release is 0.25.1, and the two must ship together.

@kdy1 kdy1 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.

Note

This text was drafted with AI and posted after human approval.

  • Harness: T3 Code
  • AI agents: coordinator: Claude Opus 5.5 (claude-opus-5-5), reviewer: GPT-6.2 Astra (gpt-6.2-astra), reviewer: GPT-6.2 Sol (gpt-6.2-sol), reviewer: Claude Opus 5.5 (claude-opus-5-5), reviewer: Claude Sonnet 5.5 (claude-sonnet-5-5)

Verdict: Approve

This review approves the pull request. The P3 items are optional and do not block the merge.

Reviewed commit: a702e40ec32bc2da32d60d2c05e0e3fc3ce63c1e

  • P3 (non-blocking): 3 (3 inline)

Comment thread docs/reference/web.mdx Resolved
Comment thread packages/web/src/browser.ts Resolved
@KrzysztofMoch
KrzysztofMoch force-pushed the t3/locator-within-option branch from a702e40 to 88c62e0 Compare November 27, 2026 07:03
@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 27, 2026
@KrzysztofMoch KrzysztofMoch added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 27, 2026
@KrzysztofMoch

Copy link
Copy Markdown
Member Author

[claude-opus-5-5] responding on behalf of KrzysztofMoch

One decision is left for a human: whether browser.locator may reject a non-object second argument (['td'].map(browser.locator) now throws INVALID_LOCATOR). The thread has the recommendation and the alternative: #2334 (comment)

@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 27, 2026
@KrzysztofMoch
KrzysztofMoch force-pushed the t3/locator-within-option branch from 88c62e0 to bf4ee4f Compare November 27, 2026 10:03
@KrzysztofMoch KrzysztofMoch added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 27, 2026
@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 27, 2026

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated review (AI triage pass), not yet read by a maintainer.

Reviewed bf4ee4f71. The rebased head plus the docs/test follow-up fix all three of kdy1's P3s; the PR now conflicts with main in one file, and main's new expressionSelectors needs to learn about scope as part of that rebase.

Earlier findings against this head:

  • kdy1, document order: fixed. web.mdx and the contract.ts note now say Playwright's chain order, and scoped-selectors.test.ts pins the nested article case.
  • kdy1, run_code test can't fail: fixed. It counts * under items now.
  • kdy1, map(browser.locator) break: the check stays (owner decision), and the changeset now names the map((selector) => browser.locator(selector)) form.
  • Ours, frame.locator silently drops a 2nd arg: not addressed and got no reply (see Should fix).
  • Ours, "another attempt" wording: unchanged (nit below).
  • Peer floor: moot. Main already has >=0.25.1 (#2255), and the rebase removed the PR's own bump.

Must fix

  1. Rebase on main. docs/reference/engine.mdx (~L1909, resolveExpression notes) conflicts with #2237, which added expressionSelectors for engines whose selector language is async (electron). Keep both bullets. While you're there, resolve.ts:78 on main returns at case 'selector' without walking node.scope, and node satisfies never checks kinds, not fields, so tsc won't flag it. After the merge, expressionSelectors({ kind: 'selector', selector: 'td.price', scope: { kind: 'selector', selector: 'tr.grace' } }) returns ["td.price"] (checked on a local merge). An engine that follows the documented pattern, like electron locate.ts:112, never queries tr.grace, so the scope resolves to nothing and the locator silently matches zero nodes. Fix: case 'selector': found.add(...); if (node.scope !== undefined) walk(node.scope);, plus a case in the expressionSelectors block of resolve-expression.test.ts.

Should fix

  1. browser.ts:1426 - this is still open from the last pass. In JS, browser.frameLocator('#grid').locator('td', { within: row }) drops within without a word and searches the whole frame. That's the same silent ignore the browser.locator check exists to stop. Refuse a defined 2nd arg with INVALID_LOCATOR and point to browser.locator(sel, { within }).

Nits

  1. screen.ts:398, engine/index.ts:278, engine.mdx:2453 still say "another attempt". The check compares engine sessions, so say "another engine session".

For the maintainer

  1. API shape: { within } in browser.locator's options slot vs a web-only chaining form (Playwright ports write row.locator(css)). This was raised last pass and is still unconfirmed.

CI is green, but on the 2026-11-26 run. It will rerun after the rebase.

kdy1
kdy1 previously requested changes Dec 2, 2026

@kdy1 kdy1 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.

Note

This text was drafted with AI and posted after human approval.

  • Harness: T3 Code
  • AI agents: coordinator: Claude Opus 5.5 (claude-opus-5-5), reviewer: GPT-6.2 Astra (gpt-6.2-astra), reviewer: GPT-6.2 Sol (gpt-6.2-sol), reviewer: Claude Opus 5.5 (claude-opus-5-5), reviewer: Claude Sonnet 5.5 (claude-sonnet-5-5)

Verdict: Request changes

This review requests changes. Fix the P2 items before merge. The P3 items are optional and do not block the merge.

The PR conflicts with main (base is 147 commits behind). git merge-tree reports conflicts in docs/browser.mdx (deleted on main), docs/reference/engine.mdx, docs/reference/web.mdx, and packages/core/src/engine/resolve.ts. The P2 below must be fixed as part of that rebase.

Reviewed commit: bf4ee4f71467222e53bbb800be67c83d5cbeb577

  • P2 (fix before merge): 1 (1 inline)
  • P3 (non-blocking): 3 (1 inline)

Items that cannot be inline

  • P3 · Non-blocking · frame.locator still ignores a second argument — packages/web/src/browser.ts:1426

    In JavaScript, browser.frameLocator('#grid').locator('td', { within: row }) drops within without an error and searches the whole frame. This is the same silent ignore that the new rejectUnknownOptions call in browser.locator (packages/web/src/browser.ts:868) prevents, and the new within option makes the call more likely. TypeScript rejects the call; JavaScript and run_code callers do not get that check. This was raised in an earlier review on this PR and has no reply.

  • P3 · Non-blocking · "How it works" step 6 describes a peer-range change that is not in the diff — the whole change

    Step 6 of the PR description says that the @e2e-dev/web peer floors on @e2e-dev/core and e2e rise to 0.25.1. The diff changes no package.json: both the base and the head already declare >=0.25.1 (#2255). AGENTS.md says that a body and a diff that disagree are a review finding.

Comment thread packages/core/src/engine/resolve.ts Resolved
Comment thread docs/reference/web.mdx Resolved
…ver nth= and closed shadow roots

A frame's locator() dropped a second argument without a word, so
frameLocator(...).locator('td', { within: row }) searched the whole frame.
It now throws INVALID_LOCATOR and points to browser.locator(selector,
{ within }). The ownership error names another engine session, which is
what it compares.
@KrzysztofMoch
KrzysztofMoch force-pushed the t3/locator-within-option branch from bf4ee4f to 1a84376 Compare December 2, 2026 10:52
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Scoped Locator Expressions

Layer / File(s) Summary
Scope contract and engine resolution
packages/core/src/engine/*, packages/core/src/locator/expression.ts, packages/mobile/src/locate.ts, packages/desktop/src/surface.ts, packages/e2e/tests/unit/resolve-expression.test.ts, packages/mobile/tests/unit/locate.test.ts, packages/desktop/tests/unit/surface.test.ts, packages/e2e/tests/unit/expression.test.ts, docs/reference/engine.mdx
LocatorExpression selector expressions can include a scope. Core, mobile, and desktop code handles scope resolution or traversal. Tests cover descendant matching, selector order, and unsupported capabilities; the engine reference documents the behavior.
Fixture locator ownership
packages/core/src/engine/index.ts, packages/core/src/locator/screen.ts, packages/core/src/run/fixtures.ts, packages/e2e/tests/unit/fixture-runtime.test.ts, packages/e2e/tests/unit/scroll-until-visible.test.ts, packages/e2e/tests/integration/mcp-run-code.test.ts, .changeset/run-code-mixed-locators.md
EngineFixtureContext.expressionOf returns the expression for a locator owned by the current engine session. Tests cover invalid locators and mixed screen and browser locators in run_code.
Web scoped locator API
packages/web/src/browser.ts, packages/web/src/locators.ts, packages/web/tests/integration/scoped-selectors.test.ts, packages/web/tests/unit/frame-screen.test.ts, packages/web/tests/types/locator-within.ts, docs/reference/web.mdx, docs/migrate/*.mdx, apps/testbed/tests/locator-query.e2e.ts, plugins/e2e/skills/e2e/references/writing-tests.md, skills/e2e/references/writing-tests.md, .changeset/browser-locator-within.md, .changeset/label-scope-filter.md, .fallowrc.json
Browser.locator accepts an optional within locator. Web locator projection and frame handling follow scoped expressions, and filters are applied to composable locators. Tests and documentation cover supported scopes, validation, and migration examples.

Possibly related issues

Suggested reviewers: okwasniewski, kdy1, michal-e2e

Change: Feature

Merge Risk: Minimal · up to 1a843

This adds a web-only browser.locator(selector, { within }) option and lets fixtures read locator expressions. Calls that omit within behave as before. The one visible behavior change is that a non-object second argument now throws a clear INVALID_LOCATOR error. That is intentional and documented. No merge-blocking risk was found.

Security architecture risk: Minimal · up to 1a843

Scoped selectors change how tests choose elements without granting access to another target or test attempt. The web engine uses Playwright’s selector chaining: the scope is a starting point for selection, not an access-control boundary.

Security review details

Security Blast Radius

  • inferred — The supported ownership expansion is between screens sharing one attempt’s target session, including the e2e MCP run_code screen and browser fixtures. Reusing a worker engine, restoring saved state, or retrying an attempt does not reuse the locator owner object.

Trust Boundaries and Controls

  • observed — The shared ownership check rejects values without e2e locator internals and locators from a different engine session before expression extraction. The fixture accessor returns the readonly-typed expression data, not the session or a resolved node reference.

Hardening Proposals

  • proposed — Add a conformance case for custom engine resolvers: a scoped selector should honor the engine’s documented scope semantics or reject the expression explicitly, rather than silently treating it as unscoped.

Rollout and rollback

  • inferred — A custom engine resolver that supports native selectors but ignores the new scope field can return whole-screen matches instead of the requested targets. This is a compatibility risk for adopters of the new expression, not an observed failure in a shipped engine.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3e78ae73-d3dd-4c57-98d7-7b4678ba9540
Commits

Reviewing files that changed from the base of the PR and between 4fec2de and 1a84376.

Files selected for processing: 32

  • .changeset/browser-locator-within.md
  • .changeset/label-scope-filter.md
  • .changeset/run-code-mixed-locators.md
  • .fallowrc.json
  • apps/testbed/tests/locator-query.e2e.ts
  • docs/migrate/cypress.mdx
  • docs/migrate/playwright.mdx
  • docs/migrate/selenium.mdx
  • docs/reference/engine.mdx
  • docs/reference/web.mdx
  • packages/core/src/engine/contract.ts
  • packages/core/src/engine/index.ts
  • packages/core/src/engine/resolve.ts
  • packages/core/src/locator/expression.ts
  • packages/core/src/locator/screen.ts
  • packages/core/src/run/fixtures.ts
  • packages/desktop/src/surface.ts
  • packages/desktop/tests/unit/surface.test.ts
  • packages/e2e/tests/integration/mcp-run-code.test.ts
  • packages/e2e/tests/unit/expression.test.ts
  • packages/e2e/tests/unit/fixture-runtime.test.ts
  • packages/e2e/tests/unit/resolve-expression.test.ts
  • packages/e2e/tests/unit/scroll-until-visible.test.ts
  • packages/mobile/src/locate.ts
  • packages/mobile/tests/unit/locate.test.ts
  • packages/web/src/browser.ts
  • packages/web/src/locators.ts
  • packages/web/tests/integration/scoped-selectors.test.ts
  • packages/web/tests/types/locator-within.ts
  • packages/web/tests/unit/frame-screen.test.ts
  • plugins/e2e/skills/e2e/references/writing-tests.md
  • skills/e2e/references/writing-tests.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@KrzysztofMoch

Copy link
Copy Markdown
Member Author

[claude-opus-5-5] responding on behalf of KrzysztofMoch

Rebased onto main (4fec2de) and pushed 1a84376. The inline items are answered on their threads; these are the ones from the review bodies:

  • A frame's locator() drops a second argument (kdy1 P3; okwasniewski, Should fix, which got no reply last time, sorry): fixed. It now throws INVALID_LOCATOR for any second argument and points to browser.locator(selector, { within }). Test in frame-screen.test.ts; reference/web.mdx and the changeset say so.
  • "How it works" step 6, a peer-range change not in the diff (kdy1 P3): right, main already has >=0.25.1. Step 6 now describes the frame.locator change and says no peer floor moves.
  • "another attempt" wording (okwasniewski nit): now "another engine session" in the error message, the expressionOf JSDoc, and reference/engine.mdx.
  • Conflicts: docs/browser.mdx is gone on main and the reference/web.mdx locator entry already covers within, so its one line went with it. The closed-shadow-root :scope limit moved from the Note main removed into the within bullets.
  • API shape, { within } vs a chained row.locator(css) (okwasniewski, for the maintainer): the ticket put within on browser.locator, so the shared Locator keeps no web-only method. Leaving that one to the owner.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

@kdy1
kdy1 dismissed their stale review December 2, 2026 11:08

All requested changes are in as of 1a84376. Checked and dismissed by a T3 Code automation (Claude) for @kdy1.

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated review (AI triage pass), not yet read by a maintainer.

Reviewed 1a8437618. Every finding from the last pass and from kdy1's dismissed review is fixed in the rebased head. I found nothing new to fix.

Earlier findings:

  • Ours/kdy1 P2, expressionSelectors ignored scope after the rebase: fixed at resolve.ts:93. I removed that line and rebuilt core. The new resolve-expression.test.ts case then fails with expected [ 'td.price' ] to deeply equal [ 'tr', '.grace', 'td.price' ].
  • frame.locator silently dropped a second argument: fixed. It now throws INVALID_LOCATOR and points to browser.locator(selector, { within }) (browser.ts:1427). This has a test in frame-screen.test.ts, and the changeset and web.mdx both say a frame's locator takes no options.
  • Wording "another attempt": fixed. screen.ts, engine/index.ts, engine.mdx, and the test constant now say "another engine session".
  • kdy1 P3 nth= on combined matches: documented in web.mdx and contract.ts. A Playwright cross-check case was added to scoped-selectors.test.ts.
  • kdy1 P3 peer floor claim in the body: fixed. Step 6 now says no peer floor moves.
  • The earlier rebase conflict is gone. The PR merges cleanly into main 31a814ad9.

Verified locally on a fresh worktree with a full build: frame-screen and scoped-selectors 18/18, resolve-expression and scroll-until-visible 40/40. The line refs in the PR body match the code. All review threads are resolved.

CI: everything passes except ios agentic, android agentic, and mobile gate. Those fail on AI Gateway requires a positive credit balance, which is an infra problem, and this PR touches no mobile or agent code.

For the maintainer

  1. API shape is still unconfirmed (raised on 11-26 and 11-27): { within } sits in browser.locator's options slot, but Playwright ports write row.locator(css), and Playwright's own options bag takes has/hasText. The PR follows ENG-1211 (web only, no locator() on the shared Locator). Once this merges it becomes public API.

@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Dec 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e team Opened by the e2e team Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. size:L Up to 499 changed lines, not counting tests, fixtures, translated docs, or the lockfile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants