diff --git a/tests/e2e/analysis.rs b/tests/e2e/analysis.rs index e345a0ba..463d70bc 100644 --- a/tests/e2e/analysis.rs +++ b/tests/e2e/analysis.rs @@ -128,6 +128,7 @@ fn test_reload() { command: "cairo.reload".into(), ..Default::default() }); + ls.wait_for_project_update(); let actual = ls.send_request::(()); diff --git a/tests/e2e/support/mock_client.rs b/tests/e2e/support/mock_client.rs index 2ac3e76f..a502f8f5 100644 --- a/tests/e2e/support/mock_client.rs +++ b/tests/e2e/support/mock_client.rs @@ -316,7 +316,7 @@ impl MockClient { }, ); - self.wait_for_notification::(|_| true); + self.wait_for_project_update(); } /// Waits for `textDocument/publishDiagnostics` notification for the given file. @@ -340,6 +340,11 @@ impl MockClient { self.open_and_wait_for_project_update(path); self.wait_for_diagnostics(path) } + + /// Waits for `cairo/projectUpdatingFinished` notification. + pub fn wait_for_project_update(&mut self) { + self.wait_for_notification::(|_| true); + } } /// Handling workspace configuration workflow.