mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
Fix integration test relying on deferred happening after focus
Focus is now one of the last things that happens during `flush_effects`, and we shouldn't have relied on `defer` in the first place to verify focus changes.
This commit is contained in:
parent
c65465b0b5
commit
5157442703
1 changed files with 2 additions and 8 deletions
|
@ -6804,13 +6804,10 @@ async fn test_peers_following_each_other(
|
|||
// Clients A and B follow each other in split panes
|
||||
workspace_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()
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue