fix(step-recorder): a composer, a slider and seven ARIA roles now record a step - #232
Merged
Conversation
…ord a step Three of the five gaps in #111, all the same failure for the tester: they act, the counter does not move, and the saved test is missing a step. A contenteditable is now a text field whose value is its own text, so a comment box, a CMS body and a chat composer record like any input — and reach the masking rules, which learned to take the value from the caller because a composer has no `.value`. `range`, `color` and `file` get a change branch each, with the never-values toggle as their only rule: a slider position is not a secret and neither is a filename. CLICK_SEL gains link, combobox, listbox, slider, spinbutton, treeitem and gridcell, each with the verb a tester would write by hand rather than "the button". Two holes found by hand and closed here: a file input the page clears fires `change` with nothing chosen and wrote `Attach "" to the field`; and a muted slider handed the editor an empty value instead of saying one was withheld. The fake page learned `isContentEditable` — inherited, nearest statement wins — because the row that proves the composer records could not run without it. Probed: node --test tests/*.test.mjs — 411 tests, 391 pass, 0 fail, 20 todo (three fewer, the rows this turns on). Re-run against pre-fix copies through REC_SRC/REC_MODULES: A26, A27, D18, D18b, D18c, D19 and D19b fail there, and with only rec-mask.js swapped back D19b alone fails, so the handed-in value is load-bearing. Hand probes: a cleared file input, a muted range, a button inside a gridcell, a blur on a contenteditable=false island. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #111 — three of its five gaps. The masked-retry gap (
D12) and the pill's "values off"chip follow in a second pull request, which is the one that closes the issue.
Each gap ends the same way for the tester: they act, the counter does not move, and the saved
test is missing a step.
What now records
isContentEditablemakes an element a text field whose value is its own text,so a comment box, a CMS body and a chat composer record like any input. The click on the
composer stays dropped — it is focus noise the Type step absorbs, exactly as for an input.
changebranch each.Set the "Volume" slider to "7",Set the "Colour" picker to "#ff0000",Attach "photo.png" to the "Avatar" field— thefilename from
files[0].name, falling back to the last segment of theC:\fakepath\…value.The never-values toggle is their only rule: a slider position is not a secret and a filename is
not one either. Under it they say
Set the "Volume" sliderandAttach a file to the "Avatar" field, and hand the editor a withheld-value marker rather than an empty string.CLICK_SEL: link, combobox, listbox, slider, spinbutton, treeitem,gridcell — each with the verb a tester would write by hand (
Open the "Country" dropdown,Select "Payments" in the tree) instead of falling back to "the button".RecMask.maskedAstakes the entered value as an argument now: a composer has no.value, andwithout this a card number typed into one would be recorded verbatim. That row is
D19b.Two holes closed on the way
changewith nothing chosen andwrote
Attach "" to the field. It now records nothing —D18d.value: "" (masked). It now says a value existed and waswithheld —
D18c.Turned on
A26,D18andD19were deferred withtest.todonaming this issue; they are live rows now.A27(all seven role sentences, named and nameless),D18b,D18c,D18d,D19bandM66are new.
tests/helpers/mini-dom.mjslearnedisContentEditable— inherited, nearest statementwins — because
D19cannot run without it.node --test tests/*.test.mjs— 411 tests, 391 pass, 0 fail, 20 todo. Against pre-fix copiesthrough
REC_SRC/REC_MODULESevery new row fails, and with onlyrec-mask.jsswapped backD19balone fails.Known, unchanged
In a multi-line composer each Enter writes its own step carrying the whole text so far. A
<textarea>already behaves that way; suppressing it would lose the step in a chat, where Entersends the message and empties the box.
🤖 Generated with Claude Code