Skip to content

Commit cc7bf83

Browse files
test: refactor to modules and accessible locators.
1 parent 919d0df commit cc7bf83

12 files changed

Lines changed: 2091 additions & 1968 deletions

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ Repository structure:
4545
- Do not introduce bundler-only assumptions into src/ runtime code.
4646
- Prefer async/await over promise chains.
4747
- Do not use IIFE, find another pattern instead.
48+
- In Playwright tests, prefer accessible selectors first: `getByRole`, `getByLabel`, `getByText`, and explicit accessible names.
49+
- Avoid `locator()` for interactive controls when a semantic selector is available.
50+
- Use `locator()` only as a fallback for cases without reliable semantics (for example: document root `html`, structural class assertions, or implementation-only hooks).
51+
- When testability needs improvement, prefer adding accessibility semantics (`role`, `aria-label`, `aria-labelledby`) over introducing new id-only selectors.
4852

4953
## CDN and runtime expectations
5054

0 commit comments

Comments
 (0)