diff --git a/crates/komorebi-core/tests/common/mod.rs b/crates/komorebi-core/tests/common/mod.rs index e4d7a748..040e2131 100644 --- a/crates/komorebi-core/tests/common/mod.rs +++ b/crates/komorebi-core/tests/common/mod.rs @@ -281,9 +281,9 @@ impl WorkspacePlatform for StubPlatform { push(format!("note_scrolling_departure {idx}")); } - fn after_floating_removed(workspace: &mut Workspace) { + fn before_floating_removed(workspace: &mut Workspace) { push(format!( - "after_floating_removed len={} focus={}", + "before_floating_removed len={} focus={}", workspace.floating_windows().len(), workspace.focused_floating_window_idx() )); diff --git a/crates/komorebi-core/tests/workspace_containers.rs b/crates/komorebi-core/tests/workspace_containers.rs index a66123f7..9f21ebc9 100644 --- a/crates/komorebi-core/tests/workspace_containers.rs +++ b/crates/komorebi-core/tests/workspace_containers.rs @@ -701,7 +701,7 @@ fn the_hooks_a_platform_does_not_override_do_nothing_to_the_workspace() { workspace.floating_windows_mut().push_back(w(6)); workspace.focus_floating_window(1); - // the stub overrides after_floating_removed only to log: the focus index is the workspace's + // the stub overrides before_floating_removed only to log: the focus index is the workspace's // own business, and the default platform of the other tests keeps it workspace.remove_floating_window(6); assert_eq!(workspace.focused_floating_window_idx(), 1); diff --git a/crates/komorebi-core/tests/workspace_layers.rs b/crates/komorebi-core/tests/workspace_layers.rs index 9f376c22..5ea9a5f5 100644 --- a/crates/komorebi-core/tests/workspace_layers.rs +++ b/crates/komorebi-core/tests/workspace_layers.rs @@ -284,7 +284,7 @@ fn a_floating_window_is_removed_by_id_and_the_hook_runs_before_it_goes() { let removed = workspace.remove_floating_window(8).unwrap(); assert_eq!(removed.id, 8); - assert_eq!(log(), ["after_floating_removed len=2 focus=0"]); + assert_eq!(log(), ["before_floating_removed len=2 focus=0"]); assert!(workspace.remove_floating_window(8).is_none()); // nothing is logged for a window that is not there assert!(log().is_empty()); @@ -530,5 +530,5 @@ fn the_floating_removal_hook_runs_before_the_window_is_taken_out() { // pins today's order (the KDE and macOS order): the hook sees both windows and the old // focus, although the trait doc says "after a floating window was taken out" - assert_eq!(log(), ["after_floating_removed len=2 focus=1"]); + assert_eq!(log(), ["before_floating_removed len=2 focus=1"]); }