Start sketching out an integration test for calls
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
8fec7da799
commit
0b1e372d11
4 changed files with 12 additions and 8 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -1040,6 +1040,7 @@ dependencies = [
|
|||
"prometheus",
|
||||
"rand 0.8.5",
|
||||
"reqwest",
|
||||
"room",
|
||||
"rpc",
|
||||
"scrypt",
|
||||
"serde",
|
||||
|
|
|
@ -55,13 +55,14 @@ features = ["runtime-tokio-rustls", "postgres", "time", "uuid"]
|
|||
[dev-dependencies]
|
||||
collections = { path = "../collections", features = ["test-support"] }
|
||||
gpui = { path = "../gpui", features = ["test-support"] }
|
||||
rpc = { path = "../rpc", features = ["test-support"] }
|
||||
client = { path = "../client", features = ["test-support"] }
|
||||
editor = { path = "../editor", features = ["test-support"] }
|
||||
language = { path = "../language", features = ["test-support"] }
|
||||
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
||||
lsp = { path = "../lsp", features = ["test-support"] }
|
||||
project = { path = "../project", features = ["test-support"] }
|
||||
room = { path = "../room", features = ["test-support"] }
|
||||
rpc = { path = "../rpc", features = ["test-support"] }
|
||||
settings = { path = "../settings", features = ["test-support"] }
|
||||
theme = { path = "../theme" }
|
||||
workspace = { path = "../workspace", features = ["test-support"] }
|
||||
|
|
|
@ -90,10 +90,15 @@ async fn test_share_project_in_room(
|
|||
)
|
||||
.await;
|
||||
|
||||
let room_a = Room::create(client_a.clone()).await.unwrap();
|
||||
let (project_a, worktree_id) = client_a.build_local_project("/a", cx_a).await;
|
||||
let project_id = project_a.update(cx_a, |project, cx| project.share(cx)).await.unwrap();
|
||||
|
||||
// room.publish_project(project_a.clone()).await.unwrap();
|
||||
|
||||
let incoming_calls_b = client_b.user_store.incoming_calls();
|
||||
let user_b_joined = room_a.invite(client_b.user_id().unwrap());
|
||||
let call_b = incoming_calls_b.next().await.unwrap();
|
||||
let room_b = Room::join(call_b.room_id, client_b.clone()).await.unwrap();
|
||||
user_b_joined.await.unwrap();
|
||||
}
|
||||
|
||||
#[gpui::test(iterations = 10)]
|
||||
|
@ -5469,9 +5474,6 @@ impl TestClient {
|
|||
worktree
|
||||
.read_with(cx, |tree, _| tree.as_local().unwrap().scan_complete())
|
||||
.await;
|
||||
project
|
||||
.update(cx, |project, _| project.next_remote_id())
|
||||
.await;
|
||||
(project, worktree.read_with(cx, |tree, _| tree.id()))
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ impl Room {
|
|||
todo!()
|
||||
}
|
||||
|
||||
pub async fn share_project(&mut self, project: ModelHandle<Project>) -> Result<()> {
|
||||
pub async fn publish_project(&mut self, project: ModelHandle<Project>) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub async fn unshare_project(&mut self, project: ModelHandle<Project>) -> Result<()> {
|
||||
pub async fn unpublish_project(&mut self, project: ModelHandle<Project>) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue