Skip to content

e2e@0.26.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 16:48
· 105 commits to main since this release
c0ba2b4

Minor Changes

  • #2253 f127149 Thanks @okwasniewski! - Breaking: A negated matcher now passes on the first read that satisfies the negation, as in Playwright. It used to pass only after the negation had held for 1 second. This covers .not on every locator matcher (expect(locator).not.toBeVisible() and the rest), on expect(browser) (not.toHaveURL, not.toHaveTitle, not.toHaveClass), and on toHaveScreenshot, and pollCondition with negated: true in a custom engine.

    A passing negated assertion is about 1 second faster. An assertion that relied on the hold, such as .not.toBeHidden() to check that a spinner stays up, or .not.toBeVisible() right after an action whose effect has not started yet, now passes at once: assert the state that follows instead, for example the content that replaces the spinner. A negated matcher still fails when no read satisfies the negation before the timeout.

    A read whose node another lookup superseded no longer counts as an absent node: toBeHidden(), .not.toBeVisible(), .not.toBeAttached(), and waitFor({ state: 'hidden' | 'detached' }) read again instead of passing on it.

  • #2367 b70181b Thanks @okwasniewski! - Breaking: getByText on a device or a desktop app no longer matches a node by its accessible name when the node shows text of its own. It matches the text the node shows, and the name only of a node that shows none, such as an icon button. Replace getByText(name) with getByLabel(name), or query the text the node shows. This affects a text an app names otherwise, an Android text or filled field with a content description (<Text accessibilityLabel="Total price">$5</Text> answers getByText('$5') and getByLabel('Total price')), and an empty Android field with a description, which getByText finds by its hint. A value named by the label beside it (a 5 named Words) no longer makes getByText('Words') ambiguous. filter({ hasText }) still reads names, text, and values. resolveExpression from @e2e-dev/core/engine follows the same rule, and shownText(node) is exported beside it for an engine that matches text itself. On the desktop engine a row or a cell reads the text inside it as its text, without the text scrolled out of it while the row itself is on screen, and a web view's heading reads its title as its text and its level from the number it reports as its value. @e2e-dev/mobile and @e2e-dev/desktop now need @e2e-dev/core and e2e 0.26.0 or newer. The web and Electron engines are released with it and read text as before.

Patch Changes

  • #2350 7e73337 Thanks @okwasniewski! - Add maxContextBytes to an agent: the bytes its context may take, 1024 through 65536, default 16384. The limit was fixed at 16384 since the top-level limits key was removed. A context that leaves the screen no room under the agent's maxInputTokens now fails the config load with INVALID_CONFIG instead of failing each model call.

  • #2304 342e95a Thanks @okwasniewski! - Bump agent-device, @agent-device/revyl, and @agent-device/testmu to 0.21.43, @vitest/expect to 5.1.2, and @agentclientprotocol/sdk to 2.12.0.

  • #2369 187a39c Thanks @okwasniewski! - The default reporter says when an agent.act step ran live because its recording is truncated: the step's line ends with not replayed: truncated. Such a step ran live on every run with nothing in the terminal saying why. A step's end progress carries cache (mode and reason) for custom reporters.

  • #2492 eb5b5f9 Thanks @gagarinyury! - The numeric flags of e2e run, e2e mcp, and e2e explore take decimal digits only. An empty value, such as --retries "$RETRIES" with the variable unset, used to read as 0 and turn retries off without a word; it is now a usage error, exit 2, as an empty --tag is. 0x1 and 1e3 are refused the same way.

  • #2258 3c499a8 Thanks @satya164! - Allow app.command.env to be a function that receives the config's services. It's called after services start and before app commands start. With defineConfig, its services argument is typed from the config's services. The CommandConfig['env'] type now includes the function, so code that reads it as an object of variables needs to handle a function too.

  • #2330 026d857 Thanks @satya164! - An entry of secrets, credentials, services, agents, an agent's tools or providerOptions, or a target's app.permissions may be undefined. So defineConfig keeps the config's inferred type when one of them is written as ci ? { … } : {} in a project without exactOptionalPropertyTypes. Before, the config fell back to E2EConfig, and test.extend rejected typeof config with an error that blamed a type annotation, or app.permissions failed to type-check. An undefined service, agent, tool, provider, or permission is left out. For an agent this is new: agents: { buyer: undefined } used to create buyer with the default options. A secret set to undefined takes its value from E2E_SECRET_<NAME>, as before. A credential set to undefined now takes its username and password from E2E_USER_<NAME>_USERNAME and E2E_USER_<NAME>_PASSWORD, where before it was INVALID_CONFIG.

  • #2461 eaed93c Thanks @michal-e2e! - The bundled e2e skill's writing-tests reference adds a Cases section for deriving boundary, list-mutation, filter, sort, sum, and rejection cases from requirements, and a Review checklist to audit setup reuse, accessible locators, row-scoped assertions, refusal invariants, persisted changes, opaque assigned values, and test-owned records before finishing a suite.

  • #2441 3834ab7 Thanks @okwasniewski! - agent.waitFor, agent.extract, and e2e explore run on Claude Code or Codex through @e2e-dev/acp with no model configured, so an agents entry that is only { executor: claudeCode() } covers every agent step. A StepExecutor gets two optional members for this: answer(question) answers a judgment when the entry has no judge or model, and extend({ system, tools }) returns a copy with guidance and defineTool tools added, which explore uses for its rules and report_finding. An executor without extend is still replaced by the built-in agent in explore. createProjectTools from e2e/agent runs defineTool tools under a step's accounting. redactProviderKeys from e2e/agent redacts only provider keys from text the run already redacted. Use your coding agent

  • #2270 0cf63f1 Thanks @okwasniewski! - e2e explore keeps a finding on the step it was reported in when that step ends at its deadline while the finding's screenshot is still being saved, in the terminal output and in the report, and no longer records a finding that arrives after the exploration is over.

  • #2273 74e2abe Thanks @okwasniewski! - A worker that hits an uncaught error no longer gets another test while it is being stopped. Before, that test could be skipped with "worker process exited before this test started" instead of running on another worker.

  • #2462 f68b4e1 Thanks @okwasniewski! - e2e init has a desktop engine for native macOS apps: npx e2e init --engine desktop, or pick it at the prompt. It writes a target with engine: desktop() and app: { bundleId: 'com.apple.calculator' }, an example test that opens Calculator, and the @e2e-dev/desktop dependency. The CI pipeline that init writes has no job for the macOS target, which needs a Mac runner whose CI agent has the Accessibility permission. Desktop

  • #2440 fd3d39d Thanks @okwasniewski! - e2e init has an Electron engine: npx e2e init --engine electron, or pick it at the prompt. It writes a target with engine: electron() and app: { appPath: '.' }, an example test, and the @e2e-dev/electron dependency. The CI pipeline that init writes has no job for the Electron target, which needs a display: run it under xvfb-run on Linux. Electron

  • #2547 1ff6915 Thanks @kacperkapusciak! - e2e init --example with-electron starts a project from the new Electron example: the greeting app every example shares, as an Electron app with three locator tests and two agent tests on @e2e-dev/electron. Example projects

  • #2372 8525d2e Thanks @okwasniewski! - e2e init now registers the MCP server with the project's own package manager: pnpm exec e2e mcp in a pnpm project and yarn exec e2e mcp in a Yarn one (yarn --silent exec -- e2e mcp on Yarn 1), where it wrote npx e2e mcp before. npx exits with EBADDEVENGINES before the MCP handshake when the project's devEngines pins another manager, and the client showed only Connection closed. Run e2e init again to update an existing entry; it keeps the entry's other settings and, for an entry started as <launcher> e2e mcp ..., the arguments after mcp. A project that names its manager only in devEngines, with no packageManager field and no lockfile, is read as that manager's.

    The commands e2e prints for a Yarn project now read yarn exec -- e2e ...: yarn e2e runs a package.json script named e2e before the binary. e2e init also tells Yarn 2 or later from Yarn 1 by the lockfile when the project has no .yarnrc.yml and no packageManager field, and by the Yarn that started it when the project has no lockfile yet.

  • #2285 53de032 Thanks @JaynouOliver! - e2e init in a workspace member with no packageManager field or lockfile of its own installs with its workspace root's package manager, so npx e2e init --install in a pnpm, Yarn, or Bun workspace no longer runs npm install and leaves a stray package-lock.json. When that manager is not installed, init warns and uses the invoking manager as before.

  • #2271 6114483 Thanks @okwasniewski! - A worker that finishes its test after an interrupt now gets the full shutdown budget to close its browser or device. Before, it was killed when the interrupt budget ran out, even mid cleanup.

  • #2446 001525c Thanks @samanyudas! - With the list or line reporter writing to a pipe or a file, as in CI, a run that prints a lot (NODE_DEBUG=*, a test that logs heavily) no longer runs about three times slower than its tests.

  • #2266 2f6dcb0 Thanks @okwasniewski! - The live window keeps showing a running step after another step inside it or beside it ends. An agent.act whose onAction hook took a screenshot used to lose its calls and its Thinking or Acting row for the rest of the act. A step that a timed-out attempt starts while its retry runs no longer replaces the retry's step in the window.

  • #2307 ae2a893 Thanks @bardrop! - The markdown reporter and the trace pages escape an underscore at the edge of a word, so a test title or message holding __proto__ or _id_ shows as written instead of rendering bold or italic.

  • #2355 bb31ad1 Thanks @kdy1! - e2e mcp: run_code in a session attached to a held test (open_session {attach}) now has the engine's fixture (desktop, browser, device) over the held test's app, as a standalone session's code has. Before, it failed with desktop is not defined, so an attached agent could not switch the window the test reads. The calls are the session's: they stay out of the held test's report and steps.

  • #2355 bb31ad1 Thanks @kdy1! - e2e mcp: an action on a node id that only an earlier observation listed now prints its test line. The action already found the node again on the newest screen by what it read as, when exactly one node there reads the same, as an agent step does, but the line looked for the id on the newest screen only and printed No test line: not on the newest screen. The line now finds that node by the rule the action uses, which goes by role, name, test id, placeholder, and input purpose, so two controls told apart by test id are told apart in the line too. An ExecutorNode from e2e/agent now carries the node's testId, as the listing shows it.

  • #2378 95b13a2 Thanks @michal-e2e! - Closing an MCP session frees its slot even while another session's app is still stopping.

  • #2329 d03e09a Thanks @okwasniewski! - open_session over MCP no longer lists the first screen. Its reply ends with one line naming the screen (revision, path, node count), action results report changes against that screen, and call {tool: "observe"} lists its nodes. The server's instructions and the descriptions of its four tools are also shorter.

  • #2364 b19cd0f Thanks @okwasniewski! - open_session's app now takes every key a config target's app does, such as launchArguments, permissions, and command, so a session opened with engine and no config file can launch its app with arguments. The keys are checked the way a config target's are.

  • #2355 bb31ad1 Thanks @kdy1! - e2e mcp: the point tools (tap_at, hover_at, drag_at, type_at, press_at, select_at) now print a test line, and test_lines keeps it. A point tool that acts on the listed control under its point prints that control's locator line. A bare tap prints screen.tapAt({ x, y }) in the viewport's pixels. When no line can repeat the action, the result says No test line: and why, and the draft keeps the step as a comment. Before, the point tools printed nothing and the draft left their steps out.

  • #2177 a5e551a Thanks @michal-e2e! - Add e2e merge-reports to combine all finished shards, their local artifacts, and rerun history into one report for CI and whole-run failure reruns.

  • #2267 0eee683 Thanks @okwasniewski! - A token refresh that finishes after e2e login or e2e logout no longer writes the old login's renewed tokens back over the new login, or back after the logout.

  • #2377 ceeca43 Thanks @michal-e2e! - Repair a skill copy missing SKILL.md when pnpm links the skill in another directory, including from a detected workspace root.

  • #2277 1372f28 Thanks @okwasniewski! - Fix an agent step that misses a read-only cache (the CI default) starting on a screen that had not held still. The step's first look now waits for the screen to settle, as it does with the cache off or read-write.

  • #2316 1ed0f18 Thanks @satya164! - Passing typeof config from an annotated config such as const config: E2EConfig to test.extend now fails with a type error. Write the config with as const satisfies E2EConfig or defineConfig instead so the target types are inferred. Before, that call compiled with plain E2EConfig. The config's engine fixtures weren't added, platform was typed as string, and fixtures already on test stayed typed on targets where they were undefined. A target spread from a value typed as Target fails the same way. Passing an explicit unknown or a generic type parameter as the config type (such as function withAccount<C extends E2EConfig>() calling base.extend<{}, {}, C>()) doesn't compile anymore.

  • #2279 21a7ef5 Thanks @okwasniewski! - Fix a cached agent step re-recording its flow when the replay ended in a scroll, the recorded end state did not show, and the model fixed it by scrolling further the same way. The entry is now evicted, as for any other repair after the replay ran in full.

  • #2268 935e3f8 Thanks @okwasniewski! - A host whose session launch failed, and whose engine then could not end the attempt it opened, now closes for good, as one whose session close failed already does. Its next session is refused with WORKER_PROTOCOL instead of opening beside the leftover attempt. The cleanup failure comes back from openHost's host.close(), and launch()'s close() throws it.

  • #2191 f5a3498 Thanks @satya164! - Add services to the config for dependencies of the app under test, like an email API or an OAuth provider. Services are started before app commands and stopped afterward during e2e run and e2e explore. Tests access them through the services fixture. startupTimeout and shutdownTimeout can be set on each service. services is now a built-in fixture name. An engine that contributes a services fixture fails to load, and a project fixture named services replaces the built-in one.

  • #2255 d4086b5 Thanks @KrzysztofMoch! - Add screen.scrollTo(edge) and locator.scrollTo(edge), which scroll the page or a list to its 'top', 'bottom', 'left', or 'right' edge, as far as it goes. On the web the screen scrolls the page, or the pane under the viewport's center when the page does not scroll; a locator scrolls its node or the nearest ancestor that scrolls. A device drags until a drag moves nothing. The engine contract gains the scrollTo action kind, outside SPI v1, which the web and mobile engines declare, so both now need @e2e-dev/core and e2e 0.25.1 or newer; the desktop engine does not declare it, so scrollTo there fails with UNSUPPORTED_CAPABILITY.

  • #2259 ea008c2 Thanks @satya164! - e2e mcp and openHost start the config's services. Sessions on the same config file share them. They're available in run_code and the services fixture.

  • #2269 e7d2f6a Thanks @okwasniewski! - A setup step that failed, such as an app command that exits before it is ready, now leaves the live window once its error is reported, instead of staying there as still starting until the run ends.

  • #2315 a423238 Thanks @michal-e2e! - e2e init and e2e upgrade leave alone the link pnpm 12.11 and later makes to the skill in the installed e2e package, without the "Symlink, not touching" warning. init no longer offers to replace it with a copy, and adds no copy where pnpm links the skill, in the project or at its workspace root. Both warn when a folder holds a copy and pnpm's pnpm-e2e-e2e link, which agents load as two e2e skills. Refreshing a copy now removes a file an earlier version shipped and the installed one doesn't; files you added stay.

  • #2157 d31e767 Thanks @michal-e2e! - Trim skills/e2e/SKILL.md for progressive disclosure, default user flows to agent.act (one goal per test, with data in params) when an agent is configured, steer coding agents to one behavior per test with checks at the end, named repeated locators, test.extend fixture cleanup in try/finally, and acting on the second item shown in list mutations, and harden migrate-to-e2e parity, target-routing, and per-test stays rules. Update e2e mcp's test_lines to adapt its guidance across fresh drafts, open_session { test } continuations, and open_session { attach } pause points, gating agent.act advice on a configured model or custom executor.

  • #2312 c97f5cf Thanks @okwasniewski! - test.step(title, fn) runs a function as one named step and returns what it returns. The trace page, the HTML report, and an MCP test outcome show the title with the calls made inside it nested under it, and steps nest. The list reporter shows the steps of a running test, and keeps a test.step in its output when it failed or an agent step ran inside it. A failure summary names the test.step the failed call was in. In report.json it is a step of kind step with the api test.step, each step inside it carries its index as parent, and step progress carries identity.parentStepId; the CTRF report has parent in a step's extra. test.step

  • #2309 9764824 Thanks @michal-e2e! - The bundled e2e skill is about half its size: the shortened references keep the rules for writing, running, and debugging tests and point to the docs page that holds the full API, which ships in node_modules/e2e/docs/.

  • #2276 bf1d1d9 Thanks @okwasniewski! - A SIGTERM or SIGINT sent to e2e run --watch while the p or t filter prompt is open now closes the prompt and ends the session, as Ctrl-C typed into the prompt already did. Before, the session kept waiting for an answer. Ctrl-D in the prompt, and a Ctrl-C that arrives in the same read as p or t (a paste), end the session too.

  • #2305 bb35f33 Thanks @okwasniewski! - e2e run --watch --timings <path> ignores only the timings file itself. A --timings path that names a directory no longer hides saves under it.

  • #2275 b7201fc Thanks @okwasniewski! - e2e run --watch --timings <file> no longer reruns itself in a loop when the timings file sits inside a watched directory: the watcher now ignores the file the run writes, like the output and cache directories.

  • #2444 f52ac52 Thanks @Toraastrta! - The t prompt of e2e run --watch reads a title pattern the way --grep does. /refund/i matches "Refund flow" instead of the literal text /refund/i, and the prompt refuses a pattern --grep refuses, such as /api/users, whose users reads as flags. The rerun banner and the next t prompt show the pattern with its flags.

  • #2280 a487e40 Thanks @okwasniewski! - Fix the "only 5 turns remain" notice reaching the model twice when the provider refused the turn's request (a forced tool choice it does not take, or a request too large) and the step sent it again.

  • Updated dependencies [7e73337, 114a497, 73ea77e, 6b24fe7, 187a39c, 3c499a8, 73ea77e, 3e95b05, 18d6f5f, 2b6ef91, 026d857, e6a2fca, 3834ab7, 73ea77e, 47d5063, 8300436, bb31ad1, 95b13a2, a5e551a, d32dc7c, f127149, 72b4f07, 1372f28, 1ed0f18, a27c6af, 21a7ef5, 73ea77e, 935e3f8, f5a3498, d4086b5, ea008c2, b9c5c70, c97f5cf, b70181b, a487e40]:

    • @e2e-dev/core@0.26.0