Skip to content

tests: the rest of tests/it on testing::Driver (#373, PR E) - #431

Merged
samitbasu merged 17 commits into
mainfrom
driver-373e
Nov 20, 2026
Merged

samitbasu merged 17 commits into
mainfrom
driver-373e

Conversation

@samitbasu

Copy link
Copy Markdown
Owner

Part of #373 (PR E of the split in the design note).

Stacked on PR D (driver-373d). The commits of this PR are the ones after driver-373d.

What

The rest of tests/it moves onto testing::Driver. These are mostly constructor swaps:

  • mount, contract_gaps, scroll_keys, vlist, continuity, pop_out, style, debug, markdown, regions, roving, layout_animation, spans, icons, gallery, children, field_box, style_switch, typeset, vlist_ports, tabular_nums, press_bubble;
  • focus_select, styled, ports, clipboard, clipboard_example, todo_demo, font_weights, accordion_example, selection, named_layouts, control_size, reduced_motion, field_text, edits, controls, field_focus, handlers, long_list_example, state_stable, autosuggest, state, focus_on_appear, inert_look, widgets, menu_offset, underline, kaolin_sidebar, escape_field, line_clamp, text_field_ring, field_focus_example, progress, docs_embed;
  • headless's two harness comparisons, and overlay's menu_example module.

The clipboard tests and mount's paste module install their FakeClipboard through Driver::layout().

Deleted from support:

  • the rig helpers nothing uses any more: harness_scaled_stepped, press, release, drag, galley_of, galleys_of, placed_galleys, part_rect, flatten_all;
  • the rig's observe hook and ReducedMotion.

The leftover local copies in the migrated files now use support's helpers.

What stays on the old rig, and why

The note leaves some files below the driver, and the old support::harness*, Rig, FrameRig, click_node, hover_over and hover_node stay for them:

  • snapshots.rs: its goldens are pixels, and regenerating one is an acceptance step.
  • fuzz.rs, and sweep.rs, whose grid_harness fuzz builds on.

The note expected the old constructors to be deleted in this PR. They can only go when snapshots and fuzz move, which the note leaves for later. So support/mod.rs is 857 lines, not the ~250 the note estimated. It carries both the drivers and the rig those three files need.

Also left on raw kittest:

  • popup_style: one test builds a new LayoutState every frame, and the other is egui-style plumbing.
  • theme_toggle: it draws a bar, not a layout.
  • sizing: raw egui widgets.
  • regions' two-layout test: it lays out two LayoutStates.
  • overlay's World/Layers, screenshot, draw and contract, as the note says.

Size, against the note's estimate

Across C–E, tests/it comes out about −840 lines net (C +3139/−3240, D +3695/−4151, E +3323/−3637), against the note's estimate of −1,500. Writing the frame counts out, rather than hiding them in per-file helpers, costs lines. It also makes the later settle() change a visible, per-call diff.

Checks

  • Test outcomes: the sorted test … ok|FAILED|ignored lines, compared with PR D. The diff is empty. Across C, D and E together, compared with origin/main, the only differences are PR B's added tests and testing: split a closure-free PlacedFrame out of Placed (#373, PR A) #408's renamed doctests.
  • Size: 58 files, +3323 / −3637.
  • CI: cargo xtask ci: exit 0.
  • No UI change.

Update: merged onto the updated D

I carried this branch on from the stopped agent. It is merged with driver-373d (D, now on C, #413 and main).

  • The whole_frame closures in continuity and kaolin_sidebar answer their layout's frame.
  • Main's changes to the files this PR moves, carried into the driver's form: One commit policy for number fields: Enter or leaving commits, Escape reverts (part of #328) #403's commit policy (focus_select's stepper tests commit with Enter, and edits.rs's three new readout tests), and Badge, Chip and Spinner in eggshell-ui-extras #360's gallery test (renamed the_sections_wrap_inside_the_aside, five segments).
  • Four newer test files stay on the old rig. Main has since added badge, hover_anchored, hover_card and refused on the old rig, and they use helpers this PR deleted. To keep this a merge, they stay on the rig for now, as snapshots and fuzz do. The four helpers they use are restored: ReducedMotion with the rig's reduced_motion, harness_scaled_stepped and drag. Moving those four files onto the driver is a follow-up for you to schedule.
  • Test outcomes after the merge, against D after its merge: identical. None failed. One tests/ui line differed only by log interleaving.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LesfK54UWq1haPSEr9X22o

samitbasu and others added 11 commits November 18, 2026 19:57
…pop_out, style onto testing::Driver (#373)

Same events in the same frames: support drivers run no frames after an
action, so every count is explicit. mount's paste module stays on the rig
(it installs a fake clipboard in the layout, which a driver does not
expose).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
…ans, icons, gallery, children, field_box, style_switch, typeset, vlist_ports, tabular_nums, press_bubble onto testing::Driver (#373)

Same events in the same frames: support drivers run no frames after an
action, so every count is explicit. Points past the window's edge (a
hover in debug, a drag in markdown) keep kittest's raw calls, since the
driver refuses them. Two harnesses stay on kittest: regions' two
LayoutStates, and layout_animation's tracked-node count, which needs the
driver's LayoutState.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
…d the tracked-nodes test run on a driver

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
…ts, accordion_example, selection, control_size, reduced_motion, field_text, edits, controls, field_focus, handlers, long_list_example, state_stable, autosuggest, state, focus_on_appear, inert_look, widgets, menu_offset, underline, escape_field, line_clamp, text_field_ring, field_focus_example, progress, docs_embed, kaolin_sidebar, headless, overlay's menu_example) onto testing::Driver (#373)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
…driver helpers; unused rig helpers deleted

The old Rig, its constructors and the helpers that take it stay only for
what the design note leaves on it: snapshots (pixel goldens), the fuzz
harness, and sweep's grid harness that fuzz builds on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
The whole_frame closures in continuity and kaolin_sidebar answer their
layout's frame, as the driver now asks.

Main's changes since, to the files this branch moves:
- #403's commit policy: focus_select's stepper tests commit with Enter
  (`commit`), and edits.rs's three new readout tests, on the driver with
  this branch's frame counts;
- #360's gallery test, renamed to the_sections_wrap_inside_the_aside with
  five segments, in the driver's form.

Main has also added tests on the old rig that this branch's deletions
would break: badge, hover_anchored, hover_card and refused. They stay on
the rig for now, as snapshots and fuzz do, so the helpers they use come
back: ReducedMotion and the rig's reduced_motion, harness_scaled_stepped
and drag. Moving those four files onto the driver is left for later.

Test outcomes equal driver-373d's after its merge; none failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LesfK54UWq1haPSEr9X22o
samitbasu and others added 6 commits November 19, 2026 17:40
One conflict, pop_out.rs: main's #327 window helper beside this branch's
Driver type, and the child's now-optional position. #327's new pop-out
tests, written on the old rig, are carried onto the driver (state_mut ->
app_mut, step -> frames(1), run_steps(n) -> frames(n), rect_of ->
rect(Target)). Outcomes: 2368, none failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LesfK54UWq1haPSEr9X22o
#382 added notify's tests on the old rig, using Rig::observe, which this
branch deleted as unused. Like badge, hover_anchored, hover_card and
refused, notify stays on the rig for now, and observe comes back for it.
Outcomes: 2386, none failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LesfK54UWq1haPSEr9X22o
@samitbasu

Copy link
Copy Markdown
Owner Author

Approved by the user on identical test outcomes (2026-11-19); notify's new tests stay on the rig with the #432 follow-up. GitHub's required checks pass on the branch merged with current main. Merging.

@samitbasu
samitbasu merged commit bec747c into main Nov 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant