Render panel in these tests

This commit is contained in:
Julia 2023-12-14 21:33:11 -05:00
parent fbcaf96ab5
commit ff4da878f9

View file

@ -1927,7 +1927,12 @@ mod tests {
let workspace = cx.add_window(|cx| Workspace::test_new(project.clone(), cx));
let cx = &mut VisualTestContext::from_window(*workspace, cx);
let panel = workspace
.update(cx, |workspace, cx| ProjectPanel::new(workspace, cx))
.update(cx, |workspace, cx| {
let panel = ProjectPanel::new(workspace, cx);
workspace.add_panel(panel.clone(), cx);
workspace.toggle_dock(panel.read(cx).position(cx), cx);
panel
})
.unwrap();
select_path(&panel, "root1", cx);
@ -2556,7 +2561,12 @@ mod tests {
let workspace = cx.add_window(|cx| Workspace::test_new(project.clone(), cx));
let cx = &mut VisualTestContext::from_window(*workspace, cx);
let panel = workspace
.update(cx, |workspace, cx| ProjectPanel::new(workspace, cx))
.update(cx, |workspace, cx| {
let panel = ProjectPanel::new(workspace, cx);
workspace.add_panel(panel.clone(), cx);
workspace.toggle_dock(panel.read(cx).position(cx), cx);
panel
})
.unwrap();
select_path(&panel, "src/", cx);