LR-LIB-STACK: the badge double-click test checks the second click lands on the badge (#2233)

This commit is contained in:
chordpli
2026-10-19 09:28:31 +09:00
parent 266e668376
commit de98d3a1ba
+4
View File
@@ -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");