visual_tests: Fix MultiWorkspace panics (#49784)

After commit a67197b, the settings-related visual tests started
panicking. The settings UI code depends on MultiWorkspaces, so changing
these tests appropriately fixes the panics.

Closes #49659

Release Notes:
- N/A
This commit is contained in:
claire authored and GitHub committed 2026-02-21 09:17:13 +00:00
1 parent b2dfc277dc
commit bda4ce4529
1 file changed
+8 -6
+8 -6
View File
@@ -1288,7 +1288,7 @@ fn run_settings_ui_subpage_visual_tests(
)
});
let workspace_window: WindowHandle<Workspace> = cx
let workspace_window: WindowHandle<MultiWorkspace> = cx
.update(|cx| {
cx.open_window(
WindowOptions {
@@ -1298,9 +1298,10 @@ fn run_settings_ui_subpage_visual_tests(
..Default::default()
},
|window, cx| {
cx.new(|cx| {
let workspace = cx.new(|cx| {
Workspace::new(None, project.clone(), app_state.clone(), window, cx)
})
});
cx.new(|cx| MultiWorkspace::new(workspace, window, cx))
},
)
})
@@ -2343,7 +2344,7 @@ fn run_tool_permissions_visual_tests(
)
});
let workspace_window: WindowHandle<Workspace> = cx
let workspace_window: WindowHandle<MultiWorkspace> = cx
.update(|cx| {
cx.open_window(
WindowOptions {
@@ -2353,9 +2354,10 @@ fn run_tool_permissions_visual_tests(
..Default::default()
},
|window, cx| {
cx.new(|cx| {
let workspace = cx.new(|cx| {
Workspace::new(None, project.clone(), app_state.clone(), window, cx)
})
});
cx.new(|cx| MultiWorkspace::new(workspace, window, cx))
},
)
})