Repository navigation
test: check the floating bar's placeholder key against the keycap ink - #7504
Conversation
#7449 gave every key hint the one keycap face, a text box's placeholder keys included, so the floating bar's placeholder key no longer shares the placeholder's quiet ink. The test still asserted that the placeholder and its key wear one colour. It now asserts that the placeholder keeps the quiet ink, so an empty hint doesn't read as prose, and that its key wears the keycap ink every key badge wears, at rest and after a click into the field. Closes #7498
|
@leaf-agent The test inserts and removes four spans in the live placeholder across its two readings solely to resolve token colours. Base
|
The placeholder-key assertion resolved --lf-quiet and --lf-ink-2 by
appending probe spans to the live placeholder, which tests/AGENTS.md
rules out ("Inject nothing to make observation easier"). It now compares
the hint with the panel's own field rendered beside it: its placeholder
ink and its press's key badge. Once the field is entered the panel's
press leaves, so the entered hint is checked against its resting face.
The protected behaviour is unchanged: the hint keeps a placeholder's
quiet ink and its key wears the keycap ink.
|
Done in f5354ae: the test no longer adds any element to the page. At rest it compares the hint's ink with the floating panel's own field placeholder, and the hint's key with the key badge on that field's press, both already rendered beside the bar. After the click the panel's press is gone, so the entered hint is checked against the inks it had at rest. Both states are still covered, and the test passes locally. |
#7449 gave every key hint the one keycap face, which the maintainer chose over sparing a text box's keys. As a result, the floating response bar's placeholder key no longer inherits the placeholder's quiet ink.
test_the_floating_response_bar_has_one_compact_facestill asserted that the placeholder and its key share one colour, so it has failed on every push tomainsince #7449 withassert 2 == 1.This PR changes only the test, and nothing on screen changes. The test now checks the face the maintainer chose:
At rest, both inks are compared with the floating panel's own field, rendered beside the bar: its empty placeholder and the key badge of the press its end offers. After a click into the field the panel's press leaves, so the entered hint is checked against its own resting face. The test injects nothing into the page.
The old assertion fails on
main; the revised test passes, run locally withuv run pytest tests/browser/test_render_anchors.py::test_the_floating_response_bar_has_one_compact_face -n0.Closes #7498 — automated triage