Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix integration test relying on deferred happening after focus
Antonio Scandurra51574427036b
diff --git a/crates/collab/src/tests/integration_tests.rs b/crates/collab/src/tests/integration_tests.rsindex c6f51a9dc4a..36dcff81bef 100644--- a/crates/collab/src/tests/integration_tests.rs+++ b/crates/collab/src/tests/integration_tests.rs@@ -6804,13 +6804,10 @@ async fn test_peers_following_each_other(// Clients A and B follow each other in split panesworkspace_a.update(cx_a, |workspace, cx| {workspace.split_pane(workspace.active_pane().clone(), SplitDirection::Right, cx);- let pane_a1 = pane_a1.clone();- cx.defer(move |workspace, _| {- assert_ne!(*workspace.active_pane(), pane_a1);- });});workspace_a.update(cx_a, |workspace, cx| {+ assert_ne!(*workspace.active_pane(), pane_a1);let leader_id = *project_a.read(cx).collaborators().keys().next().unwrap();workspace.toggle_follow(leader_id, cx).unwrap()})@@ -6818,13 +6815,10 @@ async fn test_peers_following_each_other(.unwrap();workspace_b.update(cx_b, |workspace, cx| {workspace.split_pane(workspace.active_pane().clone(), SplitDirection::Right, cx);- let pane_b1 = pane_b1.clone();- cx.defer(move |workspace, _| {- assert_ne!(*workspace.active_pane(), pane_b1);- });});workspace_b.update(cx_b, |workspace, cx| {+ assert_ne!(*workspace.active_pane(), pane_b1);let leader_id = *project_b.read(cx).collaborators().keys().next().unwrap();workspace.toggle_follow(leader_id, cx).unwrap()})