Remove TestAppContext::add_view

Instead, we now call this on window handles.
This commit is contained in:
Nathan Sobo 2023-08-07 22:15:53 -06:00
parent 0f332238b3
commit f0da6b05fd
9 changed files with 35 additions and 93 deletions

View file

@ -297,8 +297,7 @@ mod tests {
let project = Project::test(app_state.fs.clone(), [], cx).await;
let window = cx.add_window(|cx| Workspace::test_new(project.clone(), cx));
let workspace = window.root(cx);
let window_id = window.id();
let editor = cx.add_view(window_id, |cx| {
let editor = window.add_view(cx, |cx| {
let mut editor = Editor::single_line(None, cx);
editor.set_text("abc", cx);
editor