mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 13:10:54 +00:00
Don't assume the CloseActiveItem
action is synchronous in test
This commit is contained in:
parent
e93ab4db14
commit
be677a8a4b
1 changed files with 5 additions and 1 deletions
|
@ -683,6 +683,8 @@ mod tests {
|
|||
|
||||
#[gpui::test]
|
||||
async fn test_pane_actions(cx: &mut TestAppContext) {
|
||||
cx.foreground().forbid_parking();
|
||||
|
||||
cx.update(|cx| pane::init(cx));
|
||||
let app_state = cx.update(test_app_state);
|
||||
app_state
|
||||
|
@ -740,7 +742,9 @@ mod tests {
|
|||
assert_eq!(pane2_item.project_path(cx.as_ref()), Some(file1.clone()));
|
||||
|
||||
cx.dispatch_action(window_id, vec![pane_2.id()], &workspace::CloseActiveItem);
|
||||
let workspace = workspace.read(cx);
|
||||
});
|
||||
cx.foreground().run_until_parked();
|
||||
workspace.read_with(cx, |workspace, _| {
|
||||
assert_eq!(workspace.panes().len(), 1);
|
||||
assert_eq!(workspace.active_pane(), &pane_1);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue