You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
visible/matches assertions cannot match page text containing quotes (snapshot YAML re-escaping) #14
Found during the follow-up work on #12 (args-array migration).
The visible / not_visible / matches assertions read agent-browser's accessibility snapshot, whose YAML renderer re-escapes quotes inside quoted node labels: an apostrophe is doubled (it's → it''s) and a double quote is backslash-escaped. A visible: assertion on page text containing a quote can therefore never match, regardless of how faithfully the text reached the page.
Demonstrated: after set headers + open /echo-header, the page renders Header: Bearer it's-a-token verbatim (server receives it correctly), but the snapshot line is:
The runner's assertion layer should compare against un-escaped snapshot text (or parse the snapshot YAML properly) so quote-bearing page text is assertable. Textbox values are unaffected (value lines aren't YAML-quoted).
Note: two tests in test/runner-headers.test.ts currently work around this with matches patterns that tolerate exactly the doubled-apostrophe escaping (documented with block comments) — those workarounds can be simplified once this is fixed.
Activity