From 72b2e9774e448d85fe8872342cfef53eb96a218a Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 18:51:45 +0000 Subject: [PATCH] Dock: test the empty-dock reopen with the reporter's Minimal workspace (#629 follow-up, test from #630) Co-Authored-By: Nigel Ihza Firdausy <106657905+Ni-zav@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QiAJeFttZp83Fh7YuzAR5f --- crates/ui-egui/src/dock.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs index 8785aeb2..ba5f5eaa 100644 --- a/crates/ui-egui/src/dock.rs +++ b/crates/ui-egui/src/dock.rs @@ -1456,6 +1456,27 @@ mod tests { assert_eq!(PanelKind::from_name("effects & presets"), Some(PanelKind::EffectsPresets)); } + /// Ported from #630 (Ni-zav): the reporter's reproduction on the Minimal workspace. + #[test] + fn window_panels_reopen_after_last_panel_is_closed() { + use PanelKind::*; + for reopen in [Composition, Timeline, Project] { + let mut d = workspace("Minimal"); + d.close(Composition); + d.close(Timeline); + assert_eq!(d.panel_count(), 0); + d.open_near(reopen, EffectsPresets); + assert_eq!(d.panel_count(), 1); + assert!(d.is_visible(reopen), "{reopen:?} must be visible"); + } + let mut d = tabs(&[Audio], 0); + d.open_near(History, Project); + assert_eq!(d, tabs(&[Audio, History], 1)); + let mut d = workspace("Minimal"); + d.open_near(EffectsPresets, Timeline); + assert_eq!(d.path_of(EffectsPresets), d.path_of(Timeline)); + } + #[test] fn closing_earlier_inactive_tab_keeps_the_shown_panel() { use PanelKind::*;