Adjust test to flush effects between splitting pane and following

Panes now emit an event when adding the first item, so we need to flush
effects between splitting and following in order to avoid accidentally
cancelling the follow.
This commit is contained in:
Max Brunsfeld 2022-05-27 10:53:14 -07:00
parent a88b4eb3c5
commit 23cd948b5f

View file

@ -5856,6 +5856,9 @@ mod tests {
.update(cx_a, |workspace, cx| {
workspace.split_pane(workspace.active_pane().clone(), SplitDirection::Right, cx);
assert_ne!(*workspace.active_pane(), pane_a1);
});
workspace_a
.update(cx_a, |workspace, cx| {
let leader_id = *project_a.read(cx).collaborators().keys().next().unwrap();
workspace
.toggle_follow(&workspace::ToggleFollow(leader_id), cx)
@ -5867,6 +5870,9 @@ mod tests {
.update(cx_b, |workspace, cx| {
workspace.split_pane(workspace.active_pane().clone(), SplitDirection::Right, cx);
assert_ne!(*workspace.active_pane(), pane_b1);
});
workspace_b
.update(cx_b, |workspace, cx| {
let leader_id = *project_b.read(cx).collaborators().keys().next().unwrap();
workspace
.toggle_follow(&workspace::ToggleFollow(leader_id), cx)