Skip to content

Note abut Selector Priority#6408

Open
emilyrohrbough wants to merge 2 commits into
mainfrom
selector-priority
Open

Note abut Selector Priority#6408
emilyrohrbough wants to merge 2 commits into
mainfrom
selector-priority

Conversation

@emilyrohrbough
Copy link
Copy Markdown
Member

@emilyrohrbough emilyrohrbough commented Apr 8, 2026

Note

Low Risk
Documentation-only updates that clarify where Cypress.ElementSelector.defaults() can be configured and how AI skills choose selectors; no runtime or API behavior changes.

Overview
Adds a "Where to configure" section to Cypress.ElementSelector docs, clarifying that Cypress.ElementSelector.defaults({ ... }) should be called once from the support/spec context (not Node config) and loaded before specs.

Updates the cypress-author AI Skills documentation to state it attempts to follow the project’s configured Cypress.ElementSelector selector priority rather than a fixed data-* hierarchy.

Reviewed by Cursor Bugbot for commit b64207b. Bugbot is set up for automated code reviews on this repo. Configure here.

@cypress
Copy link
Copy Markdown

cypress Bot commented Apr 8, 2026

cypress-documentation    Run #1006

Run Properties:  status check passed Passed #1006  •  git commit b64207bab8: make this make sense
Project cypress-documentation
Branch Review selector-priority
Run status status check passed Passed #1006
Run duration 06m 21s
Commit git commit b64207bab8: make this make sense
Committer Emily Wisniewski
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 320
View all changes introduced in this branch ↗︎
UI Coverage  10.34%
  Untested elements 2715  
  Tested elements 3  
Accessibility  96.89%
  Failed rules  1 critical   3 serious   4 moderate   1 minor
  Failed elements 35  


## Where to configure

Call `Cypress.ElementSelector.defaults({ ... })` once in your [support file](/app/references/configuration). You want this to load before your specs and do **not** want to set this inside `describe`, `it`, `before`, `beforeEach`, or similar test hooks.
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.

why not set it in hooks or code?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants