From e040b12045a30c198016b6a67f2957b615c407b6 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Mon, 21 Sep 2026 07:23:48 -0500 Subject: [PATCH] fix: update stale SFTP transfer test for single file destination paths The test still asserted transferToHost was called with the destination directory "/srv". Commit 7727fa09 (#1304) deliberately changed a single file transfer to send the full destination path including the filename, so the correct expectation is "/srv/remote-1.txt". The code was right and the test was left behind. --- src/ui/tests/features/sftp/SftpTransferTab.test.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/tests/features/sftp/SftpTransferTab.test.tsx b/src/ui/tests/features/sftp/SftpTransferTab.test.tsx index 74b1a8a03..07c91a6a7 100644 --- a/src/ui/tests/features/sftp/SftpTransferTab.test.tsx +++ b/src/ui/tests/features/sftp/SftpTransferTab.test.tsx @@ -121,11 +121,14 @@ describe("SftpTransferTab", () => { await userEvent.click(screen.getByText("sftpTransfer.copyToTarget")); await waitFor(() => { + // A single file transfer sends the full destination path, filename + // included, rather than just the directory. See #1304: sending a file on + // its own used to drop it. expect(api.transferToHost).toHaveBeenCalledWith( "1", ["/srv/remote-1.txt"], "2", - "/srv", + "/srv/remote-1.txt", false, "auto", );