docs(r2): correct the provenance of the rewritten keyboard-flag test

The gallery's POST-303-reload was the no-JS design working, and it still
is (the INV-4 golden pins it). The defect was the full-size ejection. The
test's docstring and the contract's assertions table now say so (booth-dev
review).
This commit is contained in:
vh
2026-09-23 09:14:41 -07:00
parent 8acd10a8d2
commit 881c7f5df3
2 changed files with 8 additions and 6 deletions
+7 -5
View File
@@ -595,11 +595,13 @@ def test_the_keyboard_flag_actually_submits(browser, live):
Asserted end to end: press f, and the flag must come back from the server.
R2 C3 (docs/contracts/r2_flow.contract.md, "Assertions that change"): this
used to expect a NAVIGATION — the flag form POSTed and the page reloaded.
That reload is the defect R2 removes. The claim that matters is kept and
tightened: the flag must come back from the SERVER (the swapped tile is
server-rendered), and a marker set on the window before the keypress must
survive, which a reload would wipe."""
used to expect a NAVIGATION — the flag form POSTed, 303'd and reloaded. That
was the no-JS design working, not a defect, and it still is with scripts
off (tests/golden/r2_mark_303.json replays those responses byte for byte).
What changed is that WITH JS ON the flag now applies in place. The claim
that matters is kept and tightened: the flag must come back from the SERVER
(the swapped tile is server-rendered), and a marker set on the window before
the keypress must survive, which a reload would wipe."""
base, root = live
_gallery(root)
page = browser.new_page()