aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-12 23:03:13 -0500
committerCraig Jennings <c@cjennings.net>2026-07-12 23:03:13 -0500
commit6a0b3b899689439e9abed4286afe0638879b3553 (patch)
tree71325e20af2492217daf1e58738959f012637740
parentb0fc054d37ac7681148eb69facd40985d48a1ed2 (diff)
downloadarchsetup-6a0b3b899689439e9abed4286afe0638879b3553.tar.gz
archsetup-6a0b3b899689439e9abed4286afe0638879b3553.zip
docs(tests): record CDP probe-writing traps in the probes README
-rw-r--r--tests/gallery-probes/README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/gallery-probes/README.md b/tests/gallery-probes/README.md
index a062bfc..9b5ce7d 100644
--- a/tests/gallery-probes/README.md
+++ b/tests/gallery-probes/README.md
@@ -11,3 +11,16 @@ driven over the DevTools protocol (Node global WebSocket/fetch, no playwright).
Both exit nonzero on failure. The gallery's componentization work (widgets.js extraction)
uses a green run of these as its no-regression gate per batch.
+
+## Traps when writing new checks
+
+- Dispatch clicks on the element that owns the listener, not an ancestor; drive drags
+ with in-page synthetic PointerEvents (setPointerCapture stubbed).
+- A `find()` by textContent that matches nothing returns undefined, and the dispatch
+ no-ops silently — the check then fails looking like a widget bug. Match glyphs
+ exactly against the builder source (e.g. the transport stop button is '⏹' U+23F9,
+ not '■' U+25A0), and prefer asserting the find() hit before dispatching.
+- Reduced-motion emulation must be set before Page.navigate (launch on about:blank,
+ Emulation.setEmulatedMedia, then navigate) or the page's matchMedia snapshot misses it.
+- Kill stale headless Chromes after a crashed run; bracket the pkill pattern
+ (`pkill -f 'remote-debugging-port=934[5]'`) so it can't match its own command line.