From de98d3a1baf2239412d6ac8e3f87fa9ffde47626 Mon Sep 17 00:00:00 2001 From: chordpli Date: Mon, 19 Oct 2026 09:28:31 +0900 Subject: [PATCH] LR-LIB-STACK: the badge double-click test checks the second click lands on the badge (#2233) --- crates/ui-egui/src/tests_grid.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ui-egui/src/tests_grid.rs b/crates/ui-egui/src/tests_grid.rs index 5a724de26..6c85ecf59 100644 --- a/crates/ui-egui/src/tests_grid.rs +++ b/crates/ui-egui/src/tests_grid.rs @@ -199,6 +199,10 @@ fn double_clicking_a_stack_badge_toggles_the_stack_once() { for want in [false, true] { let badge = widget(&h, &format!("stack:{}", top.0)).expect("stack badge drawn").center(); click_at(&mut h, badge); + // the first click re-lays the grid; the second must still land on this badge, or the test + // would pass without the fix (a missed second click toggles nothing) + let moved = widget(&h, &format!("stack:{}", top.0)).expect("stack badge drawn"); + assert!(moved.contains(badge), "the badge moved from under the pointer: {moved:?}"); click_at(&mut h, badge); h.settle(SETTLE); assert_eq!(collapsed(&h), want, "a double-click toggles the stack once");