Skip to content

feat(test)!: set fixtures up on demand, once per worker, and in beforeAll - #1891

Merged
okwasniewski merged 25 commits into
mainfrom
krzysztof/feat/one-fixture-pool
Nov 18, 2026
Merged

okwasniewski merged 25 commits into
mainfrom
krzysztof/feat/one-fixture-pool

Conversation

@KrzysztofMoch

@KrzysztofMoch KrzysztofMoch commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

test.extend() fixtures ran for every test registered through that test, named or not, so each setup needed its own exported test. beforeAll and afterAll saw platform only, and nothing could be set up once per worker: the mobile benchmark kept its one-install-per-device promise on globalThis. Closes ENG-1297.

Breaking: fixtures are set up on demand

  • A test sets up the fixtures its body, its beforeEach and afterEach hooks, and those fixtures name by destructuring their first parameter. A fixture nothing names no longer runs.
  • Names are read from the function's source, as Playwright and Vitest do. async (fixtures) => {}, async (_, use) => {}, a rest property, and a bound function are a COLLECTION_ERROR with the file and line; a fixture that needs nothing writes async ({}, use) => {}.
  • A fixture that exists for its side effect takes auto: true.
  • A fixture can name the fixtures declared beside it in the same extend(), in any order; a cycle is a COLLECTION_ERROR.
  • A name the target has no fixture for, and a suite hook or worker fixture that names a test fixture, fail at selection, before any engine starts. A test that does not run on a target is not checked there.
// before: two tests, one per setup
export const test = base.extend<{ project: string }>({ project: ... });
export const taskTest = test.extend<{ task: string }>({ task: ... });

// after: one test, task names project
export const test = base.extend<{ project: string; task: string }>({
  project: async ({ app, agent, screen }, use) => { ... },
  task: async ({ project, agent, screen }, use) => { ... },
});

Worker fixtures, and beforeAll gets them

  • [fn, { scope: 'worker' }], typed with the second type argument of extend. Set up once per worker and target, the first time a test or suite hook names it, torn down when the worker ends, last set up first.
  • beforeAll and afterAll receive worker fixtures: platform, the worker fixtures of their chain, and on a 'worker' engine the engine's fixtures, app, and screen. SuiteFixtures and SuiteHookFn stay as deprecated aliases.
  • Engines declare isolation: 'worker' (defineEngine, the protocol manifest, engine-manifest-1 schema). @e2e-dev/mobile does: a device keeps its state between attempts.
  • The mobile benchmark's build fixture is { scope: 'worker', auto: true }; the globalThis map is gone.
export const test = base.extend<{}, { database: Database }>({
  database: [async ({}, use) => {
    const database = await startDatabase();
    await use(database);
    await database.stop();
  }, { scope: 'worker' }],
});

test.beforeAll(async ({ database, device }) => {
  await database.seed();
  await device.setPermission('camera', 'deny'); // a mobile target
});

Extending a built-in fixture

  • extend({ app: async ({ app }, use) => { await app.open('/dashboard'); await use(app); } }) wraps a built-in, or an earlier fixture of the chain. Inside, the name is the fixture it extends; everyone else gets what it passes to use.
  • It keeps the type, scope, and auto of what it extends; a scope or auto that differs is a COLLECTION_ERROR naming both. So a device override on mobile runs once per worker and reaches beforeAll.
  • A name like a core fixture, an engine fixture, or an earlier extend was refused before.

How it runs

flowchart LR
  C[collect: fixtureNames per body, hook, fixture] --> S[select: planAttempt / planSuiteHook per target]
  S --> W[worker: bindFixtures from the plan]
  W --> T{scope}
  T -- test --> A[set up in the attempt, torn down after afterEach]
  T -- worker --> P[WorkerFixturePool: one instance per definition, torn down in dispose]
  H[beforeAll / afterAll] --> E{engine isolation}
  E -- attempt --> PL[platform + worker fixtures]
  E -- worker --> Q{serial group or e2e mcp?}
  Q -- yes --> O[the open attempt]
  Q -- no --> N[short attempt of its own, results/suite-hooks]
  N -- cannot open / interrupted --> F[hooks still run; device, app, screen throw the reason]
Loading
  • packages/e2e/src/collect/fixture-names.ts reads names; fixture-plan.ts resolves order, scope, auto, cycles, and whether code reaches the engine; fixture-use.ts runs the plan at selection for pairs that run.
  • packages/e2e/src/run/fixture-pool.ts replaces extended-fixtures.ts. A worker fixture holds forwarders for device, app, and screen, so its steps land in whichever test or hook is running.
  • packages/e2e/src/run/suite-attempt.ts opens the short attempt for suite hooks and worker teardowns on a 'worker' engine. A failed open is one run error in phase launch.
  • Core fixtures are one table, CORE_FIXTURES in packages/core/src/run/fixtures.ts, each with its scope; app and screen follow engine.isolation.

Decisions left to the reviewer

  • Peer floors: @e2e-dev/mobile keeps e2e and @e2e-dev/core at >=0.23.2, right only if this ships in 0.23.2. If 0.23.2 is cut first, raise both.
  • Code a timed-out test leaves running keeps using a worker fixture's forwarders, which point at whatever runs next. Scoping them by async context breaks teardown code after use(), which resumes in the setup's context. Left as a follow-up.
  • A worker fixture declared in a test file, not a module it imports, gets a new instance each time the file is imported again (retry, serial group, setup test); the old one stays set up until the worker ends. Documented; a collection warning is a possible follow-up.

Made with Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running in T3 Code.

View guided diff Turn on auto-fix

test.extend() takes [fn, { scope: 'worker' }]: one instance per worker and
target, torn down when the worker ends. Suite hooks receive worker fixtures.
Engines can declare isolation: 'worker'; @e2e-dev/mobile does, so its device,
app, and screen reach beforeAll, afterAll, and worker fixtures.

Refs ENG-1297
@github-actions github-actions Bot added the size:XXL 1,000+ changed lines, not counting tests, fixtures, translated docs, or the lockfile label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e web: 93 passed

All 93 tests in 42 files
Test Time
🟢 tests/aria-hidden-flow.e2e.ts · 2 passed 766ms
🟢 aria hidden flow › picks the Pro plan by its visible text and confirms it 561ms
🟢 aria hidden flow › another plan shows the error and keeps the picker open 205ms
🟢 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/canvas-only.e2e.ts · 2 passed 298ms
🟢 canvas only › taps square, circle, then diamond at their pixel coordinates 156ms
🟢 canvas only › a shape out of order paints the error and resets progress 142ms
🟢 tests/canvas-whiteboard.e2e.ts · 2 passed 447ms
🟢 canvas whiteboard › drags both shapes into their slots and saves 245ms
🟢 canvas whiteboard › bounces a shape off the wrong slot and refuses to save early 202ms
🟢 tests/cart-totals.e2e.ts · 2 passed 413ms
🟢 cart totals › increasing a quantity updates the line total but the order summary stays stale (planted bug) 249ms
🟢 cart totals › a quantity never drops below one 164ms
🟢 tests/checkout-review.e2e.ts · 1 passed 194ms
🟢 shows a raw greeting token and an undefined delivery date (planted bug), yet places the order 194ms
🟢 tests/context-menu-trap.e2e.ts · 2 passed 676ms
🟢 context menu trap › right-click opens nothing; the row menu renames the file 348ms
🟢 context menu trap › the decoy menu items refuse and keep the file 328ms
🟢 tests/control-inventory.e2e.ts · 8 passed 3.6s
🟢 control inventory › check sets the checkbox and the radio without flipping a set one 251ms
🟢 control inventory › check picks a radio the pick replaces with its summary 193ms
🟢 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 306ms
🟢 control inventory › setInputFiles attaches files named from the project root 179ms
🟢 control inventory › the details view is left through the browser history 215ms
🟢 control inventory › scrollIntoView brings the footnote into view 181ms
🟢 control inventory › every exercise done shows the success message 1.2s
🟢 tests/css-content-ui.e2e.ts · 2 passed 333ms
🟢 css content ui › the tile labelled Ship it advances and confirming ships 181ms
🟢 css content ui › a wrong tile shows the CSS-rendered error and keeps the picker 152ms
🟢 tests/date-picker.e2e.ts · 2 passed 660ms
🟢 date picker › navigates three months ahead and books the required date 362ms
🟢 date picker › confirming without the exact date shows the error 298ms
🟢 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.0s
🟢 one submit opens one confirm, even when double-clicked 1.0s
🟢 tests/div-soup.e2e.ts · 2 passed 744ms
🟢 div soup › a wrong code is rejected 312ms
🟢 div soup › the right code grants access after the delete tile fixes a typo 432ms
🟢 tests/drag-and-drop.e2e.ts · 2 passed 675ms
🟢 drag and drop › an out-of-order item resets the dropzone 330ms
🟢 drag and drop › dropping Banana then Cherry passes 345ms
🟢 tests/filter-deep-link.e2e.ts · 2 passed 265ms
🟢 filter deep link › filtering writes the query to the URL 145ms
🟢 filter deep link › opening a shared link restores the filter 120ms
🟢 tests/gift-card-purchase.e2e.ts · 3 passed 586ms
🟢 gift card purchase › refuses to buy without an amount 173ms
🟢 gift card purchase › refuses a recipient without an at sign 210ms
🟢 gift card purchase › sends the gift card 203ms
🟢 tests/hover-menu.e2e.ts · 2 passed 460ms
🟢 hover menu › a decoy leaf is refused 196ms
🟢 hover menu › hovering Account, then Billing, reaches Redeem voucher 264ms
🟢 tests/iframe-form.e2e.ts · 2 passed 542ms
🟢 iframe form › a wrong code is refused by the host page 260ms
🟢 iframe form › the code read from one frame applies through the other 282ms
🟢 tests/image-only-ui.e2e.ts · 3 passed 451ms
🟢 image only ui › the icons have no names, so the bare svg locator is ambiguous 113ms
🟢 image only ui › a wrong icon shows the error image and keeps the icons 156ms
🟢 image only ui › tapping the star, then the heart, verifies the icons 182ms
🟢 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 793ms
🟢 kanban board › pointer drags move both cards into the goal layout 395ms
🟢 kanban board › a swipe along a path drags a card as well 185ms
🟢 kanban board › a plain tap moves nothing and the untouched board is rejected 213ms
🟢 tests/login-form.e2e.ts · 4 passed 836ms
🟢 login form › rejects a malformed email 197ms
🟢 login form › rejects a short password 187ms
🟢 login form › rejects an unknown account 198ms
🟢 login form › signs in and logs out 254ms
🟢 tests/lying-labels.e2e.ts · 4 passed 706ms
🟢 lying labels › the button whose accessible name says Pay now is the wrong one 160ms
🟢 lying labels › a text match for Pay now catches the decoy phrase too 116ms
🟢 lying labels › the field whose accessible name says Amount is the wrong one 195ms
🟢 lying labels › visible text drives the payment through 235ms
🟢 tests/native-dialogs.e2e.ts · 3 passed 482ms
🟢 native dialogs › answers the confirm, prompt, and alert chain 185ms
🟢 native dialogs › dismissing the confirm cancels the order 147ms
🟢 native dialogs › a wrong gift code is rejected 150ms
🟢 tests/new-tab-flow.e2e.ts · 2 passed 481ms
🟢 new tab flow › reads the code in the tab the app opens and enters it back in the original tab 228ms
🟢 new tab flow › a tap that opens a tab leaves the screen on the original tab, and activate shows the new one 253ms
🟢 tests/newsletter-signup.e2e.ts · 1 passed 2.2s
🟢 subscribe renders no feedback and logs a TypeError (planted bug) 2.2s
🟢 tests/onboarding-wizard.e2e.ts · 5 passed 4.5s
🟢 onboarding wizard › back keeps what was typed and the brief comes back with it 307ms
🟢 onboarding wizard › the address step takes the brief through its bare-div dropdown 330ms
🟢 onboarding wizard › the profile step steers the calendar three decades back 1.2s
🟢 onboarding wizard › the preferences step flips the toggles the brief names and leaves the trap off 1.3s
🟢 onboarding wizard › the review step repeats the brief and finishes with the PIN 1.4s
🟢 tests/order-history.e2e.ts · 2 passed 1.4s
🟢 order history › overview and settings render their panels 181ms
🟢 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 469ms
🟢 otp auto-advance › backspace on an empty box clears and refocuses the previous one 146ms
🟢 otp auto-advance › a wrong code clears every box and starts over 762ms
🟢 tests/overlay-trap.e2e.ts · 1 passed 702ms
🟢 continues only after the banner and the overlay are gone 702ms
🟢 tests/playbook-cleanup.e2e.ts · 2 passed 530ms
🟢 playbook cleanup › deleting the draft removes it from an exact-name search 265ms
🟢 playbook cleanup › cancelling the dialog keeps the draft searchable 265ms
🟢 tests/price-sorting.e2e.ts · 3 passed 384ms
🟢 price sorting › opens in the featured order with sale prices struck through 111ms
🟢 price sorting › low to high sorts by the original price, not the paid one (planted bug) 132ms
🟢 price sorting › high to low is the same wrong order reversed (planted bug) 141ms
🟢 tests/product-reviews.e2e.ts · 1 passed 1.1s
🟢 the running-shoe page lists coffee-grinder reviews (planted bug) 1.1s
🟢 tests/promo-storefront.e2e.ts · 1 passed 1.4s
🟢 buys a deal once the promo chrome is out of the way 1.4s
🟢 tests/rich-text-editor.e2e.ts · 2 passed 462ms
🟢 rich text editor › bolding exactly the required word passes the check 227ms
🟢 rich text editor › bold that spills into the previous word fails the check 235ms
🟢 tests/saved-addresses.e2e.ts · 3 passed 597ms
🟢 saved addresses › adds an address and clears the form 207ms
🟢 saved addresses › ignores an add with an empty field 174ms
🟢 saved addresses › delete shows its toast but keeps the address, on retry too (planted bug) 216ms
🟢 tests/shadow-dom-form.e2e.ts · 2 passed 368ms
🟢 shadow DOM form › rejects a wrong access code 184ms
🟢 shadow DOM form › grants access with the code from the hint inside the root 184ms
🟢 tests/smoke.e2e.ts · 1 passed 265ms
🟢 home lists the scenarios and opens one 265ms
🟢 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 205ms
🟢 accepts the terms once the button clears the sticky footer 205ms
🟢 tests/virtualized-table.e2e.ts · 1 passed 14.6s
🟢 scrolls the windowed table to the Golden Row and claims it 14.6s
🟢 tests/wishlist.e2e.ts · 2 passed 1.5s
🟢 wishlist › saving toggles the button and the tab badge 247ms
🟢 wishlist › the wishlist tab renders the empty state despite the badge count (planted bug) 1.2s

Tested by e2e 0.23.1 · 1m 2s · web · run artifacts

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e web agent: 34 passed

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

All 34 tests in 5 files
Test Agent Time
🟢 tests-agent/control-inventory.e2e.ts · 7 passed 7 steps 7.5s
🟢 control inventory › check sets the checkbox and the radio 1 step 702ms
🟢 control inventory › check picks a radio the pick replaces with its summary 1 step 298ms
🟢 control inventory › a long press and a double click are chosen over a plain tap 1 step 910ms
🟢 control inventory › a right-click opens the file menu and Rename renames the file 1 step 2.5s
🟢 control inventory › upload attaches the named project files 1 step 2.4s
🟢 control inventory › back returns from the details view to the inventory 1 step 291ms
🟢 control inventory › scroll_to brings the footnote into view 1 step 359ms
🟢 tests-agent/login-form.e2e.ts · 1 passed 1 step 356ms
🟢 act signs in with the benchmark account 1 step 356ms
🟢 tests-agent/planted-bugs.e2e.ts · 3 passed 4 steps · 8 calls 12.0s
🟢 cart totals: a judgment catches the stale order summary 2 steps · 4 calls 6.2s
🟢 checkout review: a judgment catches the broken copy 1 step · 1 call 1.5s
🟢 wishlist: a judgment catches the lost saved items 1 step · 3 calls 4.2s
🟢 tests-agent/scenarios.e2e.ts · 22 passed 22 steps · 17 calls 1m 17s
🟢 act completes shadow-dom-form 1 step · 3 calls 4.1s
🟢 act completes lying-labels 1 step · 3 calls 4.8s
🟢 act completes iframe-form 1 step · 3 calls 4.4s
🟢 act completes infinite-scroll 1 step 3.5s
🟢 act completes virtualized-table 1 step 18.3s
🟢 act completes overlay-trap 1 step 904ms
🟢 act completes sticky-chrome 1 step 888ms
🟢 act completes async-states 1 step · 3 calls 7.9s
🟢 act completes debounced-search 1 step 2.3s
🟢 act completes hover-menu 1 step 475ms
🟢 act completes drag-and-drop 1 step 455ms
🟢 act completes kanban-board 1 step 670ms
🟢 act completes context-menu-trap 1 step 2.7s
🟢 act completes stale-dom 1 step 444ms
🟢 act completes otp-auto-advance 1 step 685ms
🟢 act completes date-picker 1 step 763ms
🟢 act completes rich-text-editor 1 step 10.1s
🟢 act completes playbook-cleanup 1 step 562ms
🟢 act completes promo-storefront 1 step 2.3s
🟢 act completes new-tab-flow 1 step · 5 calls 8.7s
🟢 act completes gift-card-purchase 1 step 2.4s
🟢 act filters the list and the URL carries the filter 1 step 218ms
🟢 tests-agent/unique-cache.e2e.ts · 1 passed 1 step 289ms
🟢 act adds an address with a run-unique label 1 step 289ms

Tested by e2e 0.23.1 · 1m 38s · web · run artifacts

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e android agent: 20 passed

24 agent steps · 15 replayed from cache · 36 model calls · 200.2k tokens (85% cached) · $0.0124

All 20 tests in 1 file
Test Agent Time
🟢 tests-agent/scenarios.e2e.ts · 20 passed 24 steps · 36 calls 5m 38s
🟢 act completes Login Form 1 step 23.2s
🟢 act completes Infinite Scroll List 1 step 19.1s
🟢 act completes Modal Flow 1 step 11.7s
🟢 act completes Bottom Tabs 1 step 6.9s
🟢 act completes Text Input Variations 1 step 5.9s
🟢 act completes Broken Accessibility 2 steps · 5 calls 13.8s
🟢 act completes Vision Only 2 steps · 1 call 6.8s
🟢 act completes Gestures 1 step · 9 calls 22.9s
🟢 act completes Async States 1 step · 10 calls 23.6s
🟢 act completes Debounced Search 1 step 6.7s
🟢 act completes Huge Virtualized List 1 step 1m 50s
🟢 act completes Flattened Registration Form 2 steps · 1 call 8.3s
🟢 act completes Flattened Login 2 steps · 6 calls 14.5s
🟢 act completes Sticky Chrome Target 1 step 9.1s
🟢 act completes WebView Accessibility 1 step · 4 calls 13.6s
🟢 act completes Permission Prompt 1 step 6.4s
🟢 act completes Product Catalog 1 step 8.4s
🟢 act completes Error Recovery 1 step 8.8s
🟢 act completes Choice Controls 1 step 8.5s
🟢 act completes Sequential Onboarding 1 step 9.6s

Tested by e2e 0.23.1 · 5m 38s · android-emulator · run artifacts

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e ios: 56 passed, 1 skipped

All 57 tests in 7 files
Test Time
⏭️ tests/controls.e2e.ts · 23 passed, 1 skipped 3m 24s
🟢 control inventory › a label query resolves a labeled text field 12.4s
🟢 control inventory › a labeled field answers name, display value, value reads, fill, and clear 20.1s
🟢 control inventory › a placeholder query and attribute reads find the field 5.0s
🟢 control inventory › a secure field takes a fill and denies value reads 8.2s
🟢 control inventory › press sends a character and Enter through the soft keyboard 9.9s
🟢 control inventory › a field autofocuses on mount and focus() moves the focus 12.2s
🟢 control inventory › toBeFocused follows the focus 11.0s
🟢 control inventory › a switch checks, unchecks, and reports its state 12.7s
🟢 control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap 9.1s
🟢 control inventory › checkbox and radio roles check, uncheck, and report their state 14.8s
🟢 control inventory › a radio group reports the checked option 9.8s
🟢 control inventory › buttons report disabled, enabled, and a state that arrives later 8.8s
🟢 control inventory › a display: none element is absent rather than hidden, its visible twin attached 7.7s
🟢 control inventory › a header answers its accessible name 5.3s
🟢 control inventory › a tab row answers count, all, texts, filters, positions, and switching 7.3s
🟢 control inventory › a list answers counts, list-form text, reads, and boxes in order 7.4s
⏭️ 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 9.0s
🟢 control inventory › pointer verbs land at the point asked for 10.8s
🟢 control inventory › an ambiguous locator fails at once 6.3s
🟢 control inventory › screenshot, restart, and clearState reopen the app on its home list 14.6s
🟢 refusals › verbs a device never declares are refused before the engine 2ms
🟢 refusals › keys the soft keyboard cannot send are refused by the engine 200ms
🟢 refusals › a missing locator fails as not found once its timeout passes 1.1s
🟢 tests/device-fixture.e2e.ts · 12 passed 2m 12s
🟢 device fixture › setAppearance flips the color scheme the app reads 16.6s
🟢 device fixture › setOrientation rotates the window the app measures 7.4s
🟢 device fixture › the clipboard reads back what was written 5.8s
🟢 device fixture › home leaves the app, openApp brings it back where it was 7.6s
🟢 device fixture › closeApp then openApp relaunches on the home list 10.2s
🟢 device fixture › closeApp leaves the next commands on the same device 21.1s
🟢 device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN 10.1s
🟢 device fixture › openLink opens the scenario a deep link names 18.0s
🟢 device fixture › device.back pops the scenario 6.9s
🟢 device fixture › unstable_raw reaches the test session through the raw driver 5.0s
🟢 device fixture › setLocation and clearLocation change what the app reads 12.2s
🟢 device fixture › enrollBiometrics and setBiometrics answer a biometric prompt 11.5s
🟢 tests/device.e2e.ts · 3 passed 51.9s
🟢 sequential onboarding echoes the exact values 28.2s
🟢 onboarding rejects a malformed email before advancing 10.5s
🟢 dismissing the keyboard over choice controls leaves them as they were 13.2s
🟢 tests/flows-lists.e2e.ts · 7 passed 4m 2s
🟢 infinite scroll reaches the target item 30.8s
🟢 product catalog adds exactly two of the right variant 10.5s
🟢 gestures: long-press, then swipe left 9.1s
🟢 sticky chrome: accept below the fold, then continue 13.1s
🟢 async states: load, pull to refresh, claim through the toast 13.4s
🟢 huge virtualized list reaches row 512 2m 33s
🟢 web view coupon form applies the code shown on the page 12.3s
🟢 tests/flows.e2e.ts · 7 passed 1m 12s
🟢 text inputs unlock the submit button 12.9s
🟢 filled text inputs report their values 11.1s
🟢 modal flow confirms through the native alert 10.0s
🟢 bottom tabs act inside the last tab 7.9s
🟢 error recovery retries, then confirms the delete 9.7s
🟢 choice controls place the exact order 8.1s
🟢 debounced search selects the target once results arrive 11.8s
🟢 tests/login-form.e2e.ts · 3 passed 45.8s
🟢 login form › rejects a malformed email 13.4s
🟢 login form › rejects an unknown account 13.5s
🟢 login form › signs in and logs out 18.9s
🟢 tests/smoke.e2e.ts · 1 passed 7.4s
🟢 home lists the scenarios and opens one 7.4s

Tested by e2e 0.23.1 · 7m 7s · ios-simulator · run artifacts

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e ios agent: 21 passed, 1 skipped

25 agent steps · 12 replayed from cache · 59 model calls · 375.2k tokens (82% cached) · $0.0252

All 22 tests in 1 file
Test Agent Time
⏭️ tests-agent/scenarios.e2e.ts · 21 passed, 1 skipped 25 steps · 59 calls 8m 43s
🟢 act completes Login Form 1 step 39.3s
🟢 act completes Infinite Scroll List 1 step 36.9s
🟢 act completes Modal Flow 1 step 10.5s
🟢 act completes Bottom Tabs 1 step 7.3s
🟢 act completes Text Input Variations 1 step 12.6s
🟢 act completes Broken Accessibility 2 steps · 5 calls 23.9s
🟢 act completes Vision Only 2 steps · 6 calls 28.9s
🟢 act completes Gestures 1 step · 12 calls 54.4s
🟢 act completes Async States 1 step · 10 calls 36.3s
🟢 act completes Debounced Search 1 step · 1 call 27.1s
🟢 act completes Flattened Registration Form 2 steps · 1 call 33.0s
🟢 act completes Flattened Login 2 steps · 10 calls 52.7s
🟢 act completes Sticky Chrome Target 1 step 12.9s
🟢 act completes WebView Accessibility 1 step 12.1s
🟢 act completes Permission Prompt 1 step 11.4s
🟢 act completes Photo Picker 1 step · 2 calls 27.2s
🟢 act completes Product Catalog 1 step 10.1s
🟢 act completes Error Recovery 1 step 9.6s
🟢 act completes Choice Controls 1 step · 4 calls 31.5s
🟢 act completes Stripe PaymentSheet 1 step · 8 calls 30.9s
🟢 act completes Apple Pay 1 step 14.3s
⏭️ 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.23.1 · 8m 44s · ios-simulator · run artifacts

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e android: 58 passed, 1 skipped

All 59 tests in 7 files
Test Time
⏭️ tests/controls.e2e.ts · 24 passed, 1 skipped 2m 23s
🟢 control inventory › a label query resolves a labeled text field 17.4s
🟢 control inventory › a labeled field answers name, display value, value reads, fill, and clear 9.1s
🟢 control inventory › a placeholder query and attribute reads find the field 3.9s
🟢 control inventory › a secure field takes a fill and denies value reads 5.8s
🟢 control inventory › press sends a character and Enter through the soft keyboard 7.6s
🟢 control inventory › a field autofocuses on mount and focus() moves the focus 6.4s
🟢 control inventory › toBeFocused follows the focus 7.1s
🟢 control inventory › a switch checks, unchecks, and reports its state 7.6s
🟢 control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap 6.2s
🟢 control inventory › checkbox and radio roles check, uncheck, and report their state 9.5s
🟢 control inventory › a tab role answers getByRole 3.4s
🟢 control inventory › a radio group reports the checked option 7.3s
🟢 control inventory › buttons report disabled, enabled, and a state that arrives later 6.3s
🟢 control inventory › a display: none element is absent rather than hidden, its visible twin attached 5.4s
🟢 control inventory › a header answers its accessible name 3.5s
🟢 control inventory › a tab row answers count, all, texts, filters, positions, and switching 5.2s
🟢 control inventory › a list answers counts, list-form text, reads, and boxes in order 5.2s
⏭️ 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.9s
🟢 control inventory › a double tap lands inside the 300 ms window 6.3s
🟢 control inventory › an ambiguous locator fails at once 4.6s
🟢 control inventory › screenshot, restart, and clearState reopen the app on its home list 6.1s
🟢 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.3s
🟢 refusals › a missing locator fails as not found once its timeout passes 1.1s
🟢 tests/device-fixture.e2e.ts · 11 passed 1m 15s
🟢 device fixture › setOrientation rotates the window the app measures 4.8s
🟢 device fixture › home leaves the app, openApp brings it back where it was 4.1s
🟢 device fixture › foregroundApp sees the home screen after home() 3.7s
🟢 device fixture › closeApp then openApp relaunches on the home list 5.7s
🟢 device fixture › closeApp leaves the next commands on the same device 5.9s
🟢 device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN 3.4s
🟢 device fixture › openLink opens the scenario a deep link names 4.3s
🟢 device fixture › device.back pops the scenario 4.1s
🟢 device fixture › unstable_raw reaches the test session through the raw driver 3.0s
🟢 device fixture › setNetwork and setAirplaneMode change what the app sees 15.3s
🟢 device fixture › setLocation and clearLocation change what the app reads 20.3s
🟢 tests/device.e2e.ts · 5 passed 35.4s
🟢 permission prompt › allowing the system dialog enables the microphone 5.2s
🟢 permission prompt › a denied prompt recovers once the permission is granted outside 10.9s
🟢 sequential onboarding echoes the exact values 8.9s
🟢 onboarding rejects a malformed email before advancing 4.8s
🟢 dismissing the keyboard over choice controls leaves them as they were 5.5s
🟢 tests/flows-lists.e2e.ts · 7 passed 3m 1s
🟢 infinite scroll reaches the target item 27.3s
🟢 product catalog adds exactly two of the right variant 8.1s
🟢 gestures: long-press, then swipe left 7.5s
🟢 gestures: double-tap completes the flow 8.9s
🟢 sticky chrome: accept below the fold, then continue 10.5s
🟢 async states: load, pull to refresh, claim through the toast 10.7s
🟢 huge virtualized list reaches row 512 1m 48s
🟢 tests/flows.e2e.ts · 7 passed 54.3s
🟢 text inputs unlock the submit button 6.1s
🟢 filled text inputs report their values 5.4s
🟢 modal flow confirms through the native alert 9.0s
🟢 bottom tabs act inside the last tab 7.6s
🟢 error recovery retries, then confirms the delete 9.5s
🟢 choice controls place the exact order 7.3s
🟢 debounced search selects the target once results arrive 9.5s
🟢 tests/login-form.e2e.ts · 3 passed 30.1s
🟢 login form › rejects a malformed email 8.1s
🟢 login form › rejects an unknown account 8.8s
🟢 login form › signs in and logs out 13.2s
🟢 tests/smoke.e2e.ts · 1 passed 6.7s
🟢 home lists the scenarios and opens one 6.7s

Tested by e2e 0.23.1 · 8m 47s · android-emulator · run artifacts

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

Copy link
Copy Markdown
Member Author

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

For the human review, two calls this PR leaves to you (both also in the body):

  • Peer floors: @e2e-dev/mobile keeps e2e and @e2e-dev/core at >=0.23.2. That is right only if this ships in 0.23.2; if 0.23.2 is cut first, both floors need raising.
  • Declined from the fresh-context review: code a timed-out test leaves running can reach the next test's device through a worker fixture's forwarders. Scoping them by async context breaks teardown code after use(), which resumes in the setup's context, so it is left as a follow-up.

Android showed one first-test flake per job (home list not visible within 5 s after launch, passed on retry); the same test flakes on unrelated PRs.

A test now sets up only the test.extend() fixtures its body and its
beforeEach and afterEach hooks name in their first parameter, the fixtures
those name, and the auto ones. A suite hook sets up the worker fixtures it
names and the auto worker fixtures. Names are read from the function's
source, as Playwright and Vitest read them.

- [fn, { auto: true }] and [fn, { scope: 'worker', auto: true }] run a
  fixture nothing names.
- A fixture can name the fixtures declared beside it in the same extend()
  call. Fixtures run in declaration order, each after the ones it names.
- The attempt is resolved as one unit before the session launches: a
  fixture only an afterEach names is set up before the first beforeEach.
  An afterEach that names a fixture whose setup failed is skipped.
- Fixture rules fail as COLLECTION_ERROR with the file and line of the
  code: a parameter that is not destructured or takes a rest property, and
  a cycle, when the file is collected; a name the target lacks, a test
  fixture named by a suite hook or a worker fixture, and a fixture named
  like an engine's, at selection, for the pairs that run on that target.
- On an engine with isolation: 'worker', a suite hook or a worker fixture
  teardown that names no engine-backed fixture opens no engine attempt.

BREAKING CHANGE: a fixture nothing names no longer runs unless it is
declared with auto: true, and a test body, hook, or fixture function that
takes the whole fixture object (async (fixtures) => {}) no longer loads.

Refs ENG-1297
The five core fixtures (agent, app, screen, platform, session) are one
table in @e2e-dev/core: name, scope, and factory. createFixtures builds
the built-ins object through one loop over that table and the engine's
factories, every fixture a lazy accessor behind the same gate as before.

The runner's fixture pool, test.extend() validation, and launch read the
names and scopes from the table, so the name lists and the per-name scope
checks are gone. A launch session exposes the core fixtures that do not
belong to a test: app, screen, platform.

No behaviour change. app and screen were built with the attempt and are
now built on first read, like agent and the engine's fixtures.

Refs ENG-1297
A test.extend() fixture named like one the test already has extends it,
by Playwright's rule: inside its function its own name is the fixture it
extends (the built-in, or an earlier fixture of that name), and tests,
hooks, and other fixtures that name it receive what it hands to use().

  base.extend({ device: async ({ device }, use) => {
    await device.setPermission('camera', 'deny');
    await use(device);
  } })

- A plain function takes the scope the extended fixture has on the
  target: device is a worker fixture on mobile, so its override runs once
  per worker and reaches beforeAll; app is a test fixture on web and a
  worker fixture on mobile. A declared scope that differs is a
  COLLECTION_ERROR naming both.
- A worker-scoped override receives what a worker fixture receives for
  that built-in, the forwarder to the attempt that is running.
- On a target without the built-in nothing fails until code that runs
  there names it; then the target has no such fixture.
- Only user code sees the override: the attempt's own built-ins, which the
  runner and the worker fixtures' forwarders read, are untouched.
- Types: the override keeps the extended fixture's type and scope, through
  an extend() overload that takes overrides without type arguments.

A fixture named like a core fixture, an engine's, or an earlier one of the
chain was refused before.

Refs ENG-1297
The docs now use one term, built-in fixtures, for agent, app, screen,
platform, session, and the ones an engine contributes (browser, device),
where pages said core fixtures, contributed fixtures, or engine fixtures.

The test reference gets one table with each built-in fixture's scope on
web and on mobile, and says what the scope decides: a test fixture reaches
test bodies, beforeEach, and afterEach; a worker fixture also reaches
beforeAll, afterAll, and worker fixtures. The hooks, worker fixtures, and
override sections link to it, as do the fixtures guide and the engine
pages. The Japanese and Chinese pages carry the table and the same terms.

Refs ENG-1297
@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 17, 2026
A fixture that extends `app` or `screen` was taken for a test fixture when
its test.extend() call was checked, before any target is known. A worker
fixture declared after it that names `app` then failed at import on every
target, though the same fixture is accepted without the override and the
plan resolves both to worker scope on an engine whose state outlives a
test.

The scope of a plain function is now unresolved until a target is known,
whatever it extends, as it already was for an engine's own fixtures.

Refs ENG-1297
On an engine whose state outlives a test, a beforeAll or afterAll hook, or
a worker fixture's teardown, can start a device step and not await it. The
hook's attempt then closed under the step, and its failure arrived later
as a stray rejection charged to whichever test ran then.

The suite attempt now does what a test attempt does once its body settled:
the step is failed at its call and cancelled, its outcome is awaited within
the cleanup budget, and the hook fails with STEP_NOT_AWAITED (HOOK_FAILED
for a suite hook).

The suite attempt keeps no step records, and StepRecorder dropped the
record of the step it had just opened before marking it running, so there
was nothing to abandon: a step now counts as running before the retained
window is trimmed.

Refs ENG-1297
Registration parsed each test body, hook, and fixture function for the
fixtures it names, dropped the result, and left it in a WeakMap that the
planner and the pool read back with placeholder subjects. A cache miss
there would have named the wrong code and no line.

The parse result is now data: `names` on the registered test, the hook,
and the fixture definition. The planner and the pool read it, the WeakMap
and the per-function wrappers are gone, and one describeUser() gives an
error its subject. The explore test, registered by hand, parses its body
where it builds the record.

Unit tests state the names instead of generating source text for them.

Refs ENG-1297
The core table declared the core fixtures, but what a target's built-in
fixtures are was still assembled around it: core names plus engine names in
three files, the 'engine' scope resolved in e2e through a cast into the
table, `platform` hard-coded as the one fixture that needs no attempt, and
two structural copies of the target.

core now exports builtInFixtures(target): names, scope(name),
needsAttempt(name), attemptless(name), and the unknown-fixture message,
over one BuiltInTarget. `platform` declares in the table that the target
alone decides it. launch, the planner, and the pool read from it.

DECLARED_BUILT_INS is the same view before a target is known: a scope the
engine decides is 'unresolved'. The planner takes either one, so its
no-target mode and the `target === undefined` branches through scopeOf and
read are gone. The scope of a fixture that extends `app` before a target
is known is 'unresolved' by construction.

Refs ENG-1297
Every test body, hook, and fixture function must destructure its first
parameter, so what it reads is known before it runs. bindFixtures still
built a Proxy-gated bag for arbitrary property reads: one value in three
stores, the gate run twice (once over a faked plan), a third derivation of
scope, and an own-name shadow that re-derived what the planner had resolved.
No test code could reach the gate's throwing branches; only unit tests did,
by reading the bag directly.

The plan now records, per function, what each name it reads resolved to: a
chain fixture or a built-in. The pool hands each function a plain object
with exactly those names, the value a chain fixture handed over, or a
built-in read off the attempt when the function destructures it, so
built-ins stay lazy. An override that names itself receives the fixture it
extends because that is what its own name resolved to.

- bound.call(user) replaces user.fn(bound.fixtures); ready(user) asks
  whether every chain fixture it names was provided.
- attemptlessBuiltIns is a function from a name to a value that throws the
  reason for a built-in that needs an attempt.
- The planner runs once: it records what each fixture names, and the order
  is one declaration-order walk over that record. A second validating pass
  only reordered.

Behaviour: a bound or native function, whose parameters cannot be read, is
a COLLECTION_ERROR; it used to parse as naming nothing and still got lazy
built-ins. The docs no longer promise hooks and the body one shared object.

Refs ENG-1297
dispose, openSuiteHooks, and openSuiteAttempt were 177 lines of a second
attempt lifecycle inside TargetExecutor, written as closures in one method.

run/suite-attempt.ts now owns it: a SuiteAttempt class with open, acquire,
within, and close, over a SuiteAttemptHost interface the executor satisfies
(the way serial.ts borrows it through SerialHost), plus the worker
fixtures' teardown pass. It is the realm's SuiteHookSession itself, so the
executor keeps a context object and two call sites.

The three branches that built an attemptless reader with a "not available
to the <label>" error are one NoAttempt value ('isolated', 'unnamed',
'interrupted', or the launch failure) and one mapper to the message.

execute.ts: 1244 lines to 1052.

Refs ENG-1297
A run's attempt and an `e2e mcp` session's test each planned the test's
fixtures, bound them, entered the worker pool, set them up, ran the
beforeEach hooks and the body, filtered the afterEach hooks that can still
run, and labelled the teardowns. This PR widened that copy, and
standalone-test.ts asked the realm for the same hooks four times.

planAttemptFixtures(target, test, hooks) plans before any session exists
and returns open(), which binds the plan to the attempt: enter(), run()
for setup, hooks, and body, and cleanup() for the labelled afterEach hooks
and teardowns. Both call sites keep their own phases, budgets, and error
handling around it.

execute.ts: 1052 lines to 1031, its size on main.

Refs ENG-1297
withSuiteHooks handed its work a thunk that opened the pass on first use.
Opening one does no I/O: the suite attempt launches nothing until a hook
that names an engine fixture runs. The pass is now opened up front and
closed in finally, and the `opened` slot and the `hooks()` call form go.

Refs ENG-1297
The selection-time fixture check rebuilt the scope chain of a test and
filtered the file's hooks by it, which the realm already did its own way.
registry.ts now exports scopeChain(test) and hooksFor(registration, test),
and both use them.

Refs ENG-1297
types.ts grew from 1679 to 1798 lines in this PR. The fixture scope, the
worker fixtures, and what test.extend() takes (definitions and overrides)
are one coherent group that nothing else in the file defines against, so
they move to types/fixtures.ts and types.ts re-exports them. The public
surface is the same.

types.ts: 1798 lines to 1715.

Refs ENG-1297
A fixture that extends one the base already has was typed three ways: a
conditional branch inside the `Extra` map of FixtureDefinitions, the
`& FixtureOverrides` intersection, and the extend(overrides) overload.

Compiling the type tests without each in turn: the intersection types an
override written beside new fixtures with type arguments, and the overload
types an override-only call without them; both fail the tests when
removed. The conditional branch does not: with it gone the tests pass, and
a base name in `Extra` is `never` again, as it was before overrides. It is
removed, and the reference's copy of the declaration follows.

Refs ENG-1297
fixture-names.ts parses a parameter list, and also held FixtureUseError and
declarationSite, which format an error. They move to fixture-errors.ts.
Its identifier pattern held two raw zero-width characters; they are
written as escapes now.

hookLog and LOG_MODULE were pasted into three integration tests; they are
one helper in tests/helpers/hook-log.ts.

Refs ENG-1297
okwasniewski and others added 3 commits November 17, 2026 23:38
The summary of assertFixtureUse still listed a chain fixture named like an
engine's as an error. Such a fixture extends the built-in now; the rule
left is a declared scope that differs from the extended fixture's.

Refs ENG-1297
Two more pieces that are not the attempt's own sequence leave the file.

- Holding steps for `e2e run --step`: reading the screen a hold starts on
  and wiring AttemptHolds to the runner's hook move to step-hold.ts, beside
  the holds they configure (holdAttemptSteps, readHeldScreen).
- The result of a finished test or setup unit is a pure function of the
  pair, the verdict, the attempts, and a beforeAll failure: unitResult in
  units.ts, beside pairResult.

execute.ts: 1031 lines to 956. It was 1031 on main and 1226 at the review.

Refs ENG-1297
Main's #1880 names an unlabeled step by its api alone ("gadget.hang
finished"), where the message used to quote an empty label. The suite-hook
test's pattern required a label between the two, so it failed on the merge
with main.
@KrzysztofMoch KrzysztofMoch added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 18, 2026
A fixture that extends another and does not state `auto` now has the
extended fixture's, the way it has its scope: an override of an auto
fixture is set up for every test, and one of a built-in fixture on demand.
An `auto` that differs from the extended fixture's is a COLLECTION_ERROR
naming both, worded like the scope mismatch. This matches Playwright.

It also fixes which fixtures the plan starts from. An auto fixture was a
root by its own flag, so with an auto base and its override in one chain
the base was set up and the override skipped, while the name resolved to
the override; an override that replaced the base without naming it still
left the base running. An auto fixture is now a root only where its name
stands for it: the base runs once through the override's own name, or not
at all when the override replaces it.

Refs ENG-1297
@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 18, 2026
Main's #1880 rewrote the STEP_NOT_AWAITED message line that the next commit changes, so the branch needs it to stay mergeable.
STEP_NOT_AWAITED said "the test body returned before ..." for a step a
beforeAll, afterAll or beforeEach hook, a fixture's setup or a worker
fixture's teardown left running. The recorder now keeps the owner each
step was started under, and the runner says which code runs: the pool
for fixtures, hooks and the body, the suite attempt for suite hooks, and
a hosted session for itself.
@okwasniewski okwasniewski changed the title feat(test): set fixtures up once per worker and pass them to beforeAll feat(test)!: set fixtures up on demand, once per worker, and in beforeAll Nov 18, 2026
@okwasniewski
okwasniewski added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 847a09e Nov 18, 2026
34 checks passed
@okwasniewski
okwasniewski deleted the krzysztof/feat/one-fixture-pool branch November 18, 2026 13:10
@bardrop bardrop mentioned this pull request Nov 18, 2026
3 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines, not counting tests, fixtures, translated docs, or the lockfile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants