Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Toolbar: assert Alt-click wrap-around in the flyout cycle test.

tareqdb4f8a4d6da0
diff --git a/crates/ui-egui/src/toolbar/tests.rs b/crates/ui-egui/src/toolbar/tests.rs
index 97a3bf6c3..5db130f63 100644
--- a/crates/ui-egui/src/toolbar/tests.rs
+++ b/crates/ui-egui/src/toolbar/tests.rs
@@ -406,4 +406,7 @@ fn alt_click_cycles_the_tool_flyout_group() {
assert!(h.state().app.ui.flyout.is_none(), "Alt-click must not open the flyout");
click(&mut h, alt);
assert_eq!(h.state().app.session.tool_id(), "polygonFrame");
+ click(&mut h, alt);
+ assert_eq!(h.state().app.session.tool_id(), "rectangleFrame", "Alt-click after the last group tool wraps to the first");
+ assert!(h.state().app.ui.flyout.is_none(), "wrap-around Alt-click must not open the flyout");
}