From bcba11ba8209874d2d483be7b5de3724618359c2 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 18 Apr 2023 17:27:05 +0200 Subject: [PATCH] Reflect new behavior in test now that we don't replace windows anymore --- crates/zed/src/zed.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index c8f1f41c02..4f9b8fca6c 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -735,8 +735,6 @@ mod tests { .unwrap(); assert_eq!(cx.window_ids().len(), 2); - // Replace existing windows - let window_id = cx.window_ids()[0]; cx.update(|cx| { open_paths( &[PathBuf::from("/root/c"), PathBuf::from("/root/d")], @@ -746,20 +744,7 @@ mod tests { }) .await .unwrap(); - assert_eq!(cx.window_ids().len(), 2); - cx.read_window(window_id, |cx| { - let workspace = cx.root_view().clone().downcast::().unwrap(); - let workspace = workspace.read(cx); - assert_eq!( - workspace - .worktrees(cx) - .map(|w| w.read(cx).abs_path()) - .collect::>(), - &[Path::new("/root/c").into(), Path::new("/root/d").into()] - ); - assert!(workspace.left_sidebar().read(cx).is_open()); - assert!(workspace.active_pane().is_focused(cx)); - }); + assert_eq!(cx.window_ids().len(), 3); } #[gpui::test]