From f5cc5ffb4fa6caf135c7f7ebde063a419d375db5 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Sun, 19 Apr 2026 16:28:02 +0200 Subject: [PATCH] fix: satisfy clippy and stabilize app startup test --- src-tauri/src/git/connect.rs | 6 +++--- src/App.test.tsx | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src-tauri/src/git/connect.rs b/src-tauri/src/git/connect.rs index c85e5ea1..7ed8cfc1 100644 --- a/src-tauri/src/git/connect.rs +++ b/src-tauri/src/git/connect.rs @@ -132,7 +132,7 @@ fn finish_remote_connection(vault: &Path, connection: &RemoteConnection) -> GitA { return connect_result( ConnectStatus::IncompatibleHistory, - &format!( + format!( "This repository already has git branches, but not '{}'. Use an empty repository or one created from this vault.", connection.branch ), @@ -154,7 +154,7 @@ fn finish_remote_connection(vault: &Path, connection: &RemoteConnection) -> GitA if behind > 0 { return connect_result( ConnectStatus::IncompatibleHistory, - &format!( + format!( "This repository already has commits on '{}' that are not in this vault. Tolaria will not connect it automatically.", connection.branch ), @@ -307,7 +307,7 @@ fn classify_connect_error(stderr: &str) -> GitAddRemoteResult { connect_result( ConnectStatus::Error, - &format!( + format!( "Could not connect that remote: {}", concise_git_detail(stderr) ), diff --git a/src/App.test.tsx b/src/App.test.tsx index e2b474ea..9963b505 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -202,10 +202,7 @@ describe('App', () => { it('renders the four-panel layout', async () => { render() - // Wait for vault to load - await waitFor(() => { - expect(screen.getByText('All Notes')).toBeInTheDocument() - }) + expect(await screen.findByText('All Notes', {}, { timeout: 5000 })).toBeInTheDocument() }) it('loads and displays vault entries in sidebar', async () => {