Fill Area: the large-document test presses while a hover search runs

The pointer leaves the area to start a search on another thread before the press, so the test covers a click that waits for that search, and it checks that the press settles it.
This commit is contained in:
dotCooCoo
2026-11-17 18:32:27 -08:00
parent 4e521fca07
commit 94fee63cc1
+5 -2
View File
@@ -497,10 +497,13 @@ fn fill_area_tool_hovers_a_large_document_on_another_thread() {
s.pointer(&PointerEvent::new(PointerKind::Move, 300.0, 300.0), v).unwrap();
s.tool_poll(v, true).unwrap();
assert_eq!(s.overlays(v).len(), 1);
// A click while a search runs waits for it.
s.pointer(&PointerEvent::new(PointerKind::Move, 310.0, 300.0), v).unwrap();
// A click while a search runs waits for it: the pointer leaves the area, which starts a
// search, and the press inside the area comes before any poll.
s.pointer(&PointerEvent::new(PointerKind::Move, 500.0, 500.0), v).unwrap();
assert!(s.tool_waiting());
let undo = undo_len(&s);
s.pointer(&PointerEvent::new(PointerKind::Down, 310.0, 300.0), v).unwrap();
assert!(!s.tool_waiting(), "the press waited for the search");
s.pointer(&PointerEvent::new(PointerKind::Up, 310.0, 300.0), v).unwrap();
assert_eq!(undo_len(&s), undo + 1);
}