Finding an element and then clicking it are two round trips. Every surface on the plan redraws its panel from an answer, so a redraw landing between the two clicks a node that has left the document. The trait these tests use says so about itself, in the docblock of the assertion written for exactly this: "a wait that ends early turns a slow machine into a failing test", and beside it, "no handle to go stale". The clicks never followed that rule.
It has two outcomes, which is why it looked like two unrelated bugs. Chrome reports a stale element reference and the test dies at once, which is what #3618720: Call a partition of a resource a partition, in the engine and across the seam fixed in one scenario. Or the click reaches the detached node, nothing happens, no request is made, and a wait for the consequence burns its whole budget: twenty seconds to say that a string never appeared.
What changes
Twenty-seven held handles in the two picker tests go through the handle-free click added in #3618720: Call a partition of a resource a partition, in the engine and across the seam, which queries and dispatches in one expression. Two runs of presses become one dispatched run instead, because a run past a limit has to land inside the window the queue coalesces and a round trip each closes it: through the driver, on a loaded runner, one ask silently becomes several.
Two held handles stay, and say why. A scenario presses the same row twice to put two lines in one request, where re-querying between them would defeat the point. And the drag scenario keeps one real driver press for its control, because what it needs to prove is that a REAL press still books, which a dispatched sequence is not.
The helper needed fixing too
Converting the sites found two things wrong with it, both of which would have bitten the next person to use it. element.click() does not exist on an SVG node: it is defined on HTMLElement rather than on Element, so a zone drawn on the plan answers "click is not a function". And a handler waiting on the press rather than the click never hears a bare click() at all, so a seat that books on one is never taken. It dispatches mousedown, mouseup and click now, which the project already knew was necessary elsewhere.
Not in this change
Seven sites remain in three other classes. SlotBookingAreaTest reaches its button through a helper whose docblock already says it is "re-read each time rather than held across a request", which is the milder form of this; the other two are one site each. None of the three has ever failed this way, and converting them would mean changing tests this issue has no reading on, including a performance test pinned to exact query counts. Their own change, on their own evidence.
Verification
Both converted classes green, and the conversion was checked by running them rather than by reading: the SVG problem and the press-versus-click problem both came back as failures, one of them in the scenario whose whole subject is that a plain click books. phpstan level 3 reports no errors, phpcs and cspell clean.
AI-Generated: Yes (Claude Code made this change and wrote this summary. It found the sites while diagnosing #3618773: Order the plan’s offers by weight and then by id, so a bare seat click always books the same one, which turned out to be a different bug entirely; the two defects in the helper were found by running the converted tests, not by reading them, and the scope was cut to the two classes that have actually failed rather than every site matching the pattern.)
Issue fork yoyaku-3618818
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mably commentedComment #4
mably commentedComment #6
mably commented