diff --git a/crates/ui-egui/src/panel_docking/native_tests.rs b/crates/ui-egui/src/panel_docking/native_tests.rs index 25c15f5182..2439eea459 100644 --- a/crates/ui-egui/src/panel_docking/native_tests.rs +++ b/crates/ui-egui/src/panel_docking/native_tests.rs @@ -582,6 +582,25 @@ fn copy_and_cut_in_a_native_window_act_on_the_art_while_another_windows_label_ha } } +/// A panel or the Tools rail floated out of the dock opens an OS window that shows, in every built-in workspace, +/// including those whose Contextual Task Bar shows over the canvas. +#[test] +fn a_panel_floated_in_any_built_in_workspace_opens_a_shown_window() { + for workspace in crate::workspaces::builtins() { + for panel in ["tools", "properties"] { + let mut h = Harness::new(); + h.app.run("window.workspace", json!({"name": workspace.name})).unwrap(); + h.frames(3); + h.app.run("window.panel.float", json!({"panel": panel, "x": 200, "y": 200})).unwrap(); + h.frames(6); + let viewport = h.viewport(panel); + let host = h.host.borrow(); + let window = host.windows.get(&viewport).expect("the panel opened an OS window"); + assert!(window.visible, "{}: the {panel} window shows", workspace.name); + } + } +} + /// A panel opened from the Window menu floats in an OS window that keeps showing while the art on /// the canvas is selected and moved, and the Selection tool's move ends where it is released. #[test]