fix: keep successful file path attachments silent

This commit is contained in:
amosblomqvist
2026-10-28 19:52:07 +02:00
parent 0b576d5973
commit 1750dd8a24
3 changed files with 14 additions and 3 deletions
+11 -1
View File
@@ -124,7 +124,17 @@ test("desktop drop inserts quoted paths at the focused editor caret instead of t
assert.equal(f.doc.activeElement, f.editor);
assert.deepEqual(f.appends, [], "focused editor wins over the registered question field");
assert.deepEqual(f.resolved, files, "only Electron's full path, never File.name, enters the draft");
assert.match(f.status, /File paths attached/);
assert.equal(f.status, "", "successful file attachment is silent");
f.assertPathOnly();
});
test("a successful drop clears an earlier failure without replacing it with a confirmation bubble", async () => {
const f = await fixture();
await f.event("drop", f.transfer([f.file("virtual.pdf")]));
assert.match(f.status, /No local file paths were available/);
await f.event("drop", f.transfer([f.file("valid.pdf", "/existing/valid.pdf")]));
assert.deepEqual(f.appends, ["`/existing/valid.pdf`"]);
assert.equal(f.doc.querySelector('[role="status"]'), null);
f.assertPathOnly();
});