Skip to content

docs(readme): document the full locator/interaction/assertion/mocking surface#72

Merged
BenSheridanEdwards merged 1 commit into
mainfrom
docs/readme-overhaul
Jul 2, 2026
Merged

docs(readme): document the full locator/interaction/assertion/mocking surface#72
BenSheridanEdwards merged 1 commit into
mainfrom
docs/readme-overhaul

Conversation

@BenSheridanEdwards

Copy link
Copy Markdown
Owner

Summary

Docs-only. The README documented roughly a third of the shipped public surface; this fills the gaps without changing the pitch or structure:

  • Locators: full getBy* list plus narrowing — first()/last()/nth()/count() and the near() relative locator (with maxDistance).
  • Interactions: fill()/clear() (the v0.11.0 atomic path), check()/uncheck(), press({ duration }), waitFor(), tap({ clickableAncestor }), and native.fill(label, text).
  • Assertions: all eight matchers with .not, plus the did-you-mean failure hint shown as a sample error.
  • Mocking: mock.route().fulfill/reject/abort, expect(mock).toHaveSent/toHaveReceived, and mock.send() — the Playwright-page.route() half of the pitch was previously invisible.
  • Troubleshooting: the "Locator times out" row now points at the automatic did-you-mean candidates instead of telling users to grep page source.
  • Evidence: the single closing line grew into a short section with captureState("checkpoint").

Every example was verified against the current exports (src/index.ts star-exports, FrameMatch shape, MockRoute signatures, locator options) before writing.

Proof

  • npm run check
    • Passed on docs/readme-overhaul (no code changes).
  • npm test
    • Passed at branch point (154/154); no code touched.
  • Generated project/device proof, or N/A:
    • Not applicable: README-only change.
    • Screenshots: Not applicable; documentation text with no rendered UI or behavioural surface.

Risk

  • None beyond docs accuracy; all documented calls checked against the source.

Notes

  • Full device coverage not run: docs only.
  • Deliberately not documented: features still in open PRs (scrollIntoView, inspect) — docs should trail merges.

PR Proof Law

  • I followed .agents/DEFINITION_OF_DONE.md and .agents/skills/pr-inline-screenshot-proof/SKILL.md.
  • Screenshots are committed and embedded inline with ![alt](...png?raw=1), or the proof section says Not applicable with the technical reason.
  • The PR body has no bare screenshot links, local paths, relative paths, or proof placeholders.

…ocking surface

The README showed 3 of 8 matchers and 2 of 9 interactions, and the
mocking section demonstrated the server without route() or the traffic
assertions — the Playwright-shaped core of the pitch. Now covered:
fill/clear/check/uncheck/press/waitFor/clickableAncestor, locator
narrowing (first/last/nth/near/count), all matchers with .not, the
did-you-mean failure hint (also reflected in Troubleshooting), mock
route().fulfill/reject/abort + toHaveSent/toHaveReceived/send, and an
Evidence section with captureState.
@BenSheridanEdwards BenSheridanEdwards merged commit ae5514f into main Jul 2, 2026
1 check passed
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.

1 participant