fix: make clipboard collector navigation opt-in

This commit is contained in:
Sucukdeluxe
2026-09-06 12:24:20 +02:00
parent bd11b57fb8
commit 8957aa3c23
17 changed files with 174 additions and 14 deletions
+16
View File
@@ -0,0 +1,16 @@
import { describe, expect, it } from "vitest";
import { shouldFocusCollectorImport } from "../src/renderer/collector-navigation";
describe("collector import navigation", () => {
it("keeps automatic clipboard imports in the background unless explicitly enabled", () => {
expect(shouldFocusCollectorImport("clipboard", undefined)).toBe(false);
expect(shouldFocusCollectorImport("clipboard", false)).toBe(false);
expect(shouldFocusCollectorImport("clipboard", true)).toBe(true);
});
it("keeps explicit manual imports focused regardless of the automatic setting", () => {
for (const enabled of [undefined, false, true]) {
expect(shouldFocusCollectorImport("manual", enabled)).toBe(true);
}
});
});