Tests: Find Objects during a drag journals the drag's own selection

After Find Objects with `select` runs during a drag, the drag's own
selection is journaled before its release, so the expected journal is
document.find, select.set, shape.rectangle.
This commit is contained in:
dotCooCoo
2026-11-24 18:20:37 -08:00
parent ea602fcd00
commit dd37e3c14b
@@ -448,7 +448,8 @@ fn find_objects_with_select_during_a_drag_skips_the_drag_preview() {
assert_eq!(r["matches"][0]["id"], other.0, "{at}: {r}");
pointer(&mut s, PointerKind::Up, 200.0, 180.0);
assert_eq!(objects(&s), 2, "{at}: the release draws the rectangle");
assert_eq!(journaled(&s, start), ["document.find", "shape.rectangle"], "{at}");
// The drag's own selection is journaled after the find, so the release replays on it.
assert_eq!(journaled(&s, start), ["document.find", "select.set", "shape.rectangle"], "{at}");
let (mut replayed, _) = session(real_time);
replay_from(&s, start, &mut replayed);
assert_eq!(objects(&replayed), 2, "{at}");