diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-12 23:03:13 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-12 23:03:13 -0500 |
| commit | 690d523e4d5008ce169c8a746551153d2f15f164 (patch) | |
| tree | 71325e20af2492217daf1e58738959f012637740 /tests/gallery-probes | |
| parent | 38e6ccc8a3587651cfc957472ae007dd230dff08 (diff) | |
| download | archsetup-690d523e4d5008ce169c8a746551153d2f15f164.tar.gz archsetup-690d523e4d5008ce169c8a746551153d2f15f164.zip | |
docs(tests): record CDP probe-writing traps in the probes README
Diffstat (limited to 'tests/gallery-probes')
| -rw-r--r-- | tests/gallery-probes/README.md | 13 |
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. |
