Repository navigation
Conversation
A `locators` config option, at the top level and per target, sets the default `visible` option of `getByText`, `getByLabel`, `getByPlaceholder`, and `getByTestId`. A target's value replaces the config's, and a query's own option wins over both. The default stays off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`locate` and the test lines a session writes now build their queries with the target's `locators.visible`, so they count matches as a test under the same config does. The config digest reads the default only through the resolved targets, so equal defaults digest alike. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
satya164
marked this pull request as draft
November 23, 2026 15:09
Contributor
🟢 e2e web: 95 passedAll 95 tests in 43 files
Tested by e2e 0.24.0 · 1m 20s · web · run artifacts |
Contributor
🟢 e2e web agent: 34 passed35 agent steps · 26 replayed from cache · 25 model calls · 134.2k tokens (94% cached) · $0.0056 All 34 tests in 5 files
Tested by e2e 0.24.0 · 1m 47s · web · run artifacts |
Contributor
🟢 e2e android agent: 20 passed24 agent steps · 15 replayed from cache · 40 model calls · 251.8k tokens (87% cached) · $0.0144 All 20 tests in 1 file
Tested by e2e 0.24.0 · 5m 48s · android-emulator · run artifacts |
Contributor
🟢 e2e ios: 59 passed, 1 skippedAll 60 tests in 7 files
Tested by e2e 0.24.0 · 6m 58s · ios-simulator · run artifacts |
Contributor
🟢 e2e ios agent: 21 passed, 1 skipped25 agent steps · 12 replayed from cache · 60 model calls · 426.2k tokens (81% cached) · $0.0293 All 22 tests in 1 file
Tested by e2e 0.24.0 · 8m 33s · ios-simulator · run artifacts |
Contributor
🟢 e2e android: 60 passed, 1 skippedAll 61 tests in 7 files
Tested by e2e 0.24.0 · 9m 41s · android-emulator · run artifacts |
3 of 5 tasks
Collaborator
Author
|
Moved to #2116 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Role queries never match a hidden node, but
getByText,getByLabel,getByPlaceholder, andgetByTestIddo. On native apps, screens kept mounted behind the current one stay in the tree, so suites pass{ visible: true }to almost every query. A newlocatorsconfig option makes that the default.locators: { visible }sits at the top level and on each target. A target'svisiblewins over the config's, and a query's ownvisiblewins over both. The default isfalse, so existing suites run as before.ResolvedTarget.locators). The screen applies it in the four queries (packages/core/src/locator/screen.ts).getByRoleandgetByDisplayValueare unchanged.e2e mcpsession applies it too:run_code,locate, and the test lines build the same queries a test under that config builds. Without this,locatecounted hidden twins a test would skip, and a test line's.nth(i)could point at the wrong node.{},{ visible: false }, and no key all digest alike.reference/config.mdx(locators,LocatorsConfig),reference/screen.mdx(Hidden duplicates),reference/mcp.mdx,reference/errors.mdx, the Maestro migration guide, and thee2eandmigrate-to-e2eskills.Error codes the new option can raise:
INVALID_CONFIGlocators, at the top level or on a target, is not an object, has a key other thanvisible, or has avisiblethat is not a booleanVerified
Ran it locally: yes, Chromium only. Firefox could not run on this machine.
/controlspage, which has a hiddenbannertwin. A scratch config withlocators: { visible: true }ran a test that uses no{ visible: true }:getByTestId('banner')resolves to one node and taps,getByText('Sale')resolves, andgetByTestId('banner', { visible: false })counts 2.locators: { visible: 'yes' }:firefox-1572) does not start on this Mac (macOS 27.2.1). It exits withCould not find profile folder, also when started directly outside e2e and after a forced reinstall. CI runs no Firefox either. The default is applied in core before a query reaches the engine, so the engine gets the samevisible: truequery that{ visible: true }on a query sends today.tests/integration/locators-visible.test.tsruns two web targets from a config file through worker processes: one inheritsvisible: true, one overrides it withfalse.🤖 Generated with Claude Code