diff --git a/tests/unit/App.test.tsx b/tests/unit/App.test.tsx index 5e65be9..317e59e 100644 --- a/tests/unit/App.test.tsx +++ b/tests/unit/App.test.tsx @@ -25,8 +25,22 @@ vi.mock('../../src/renderer/inbox/api.js', () => ({ loadOllamaSettings: vi.fn(async () => ({ endpoint: '', model: '' })), saveOllamaSettings: vi.fn(async () => ({ ok: true })), ollamaRecheck: vi.fn(async () => ({ ok: true })), - getAutostart: vi.fn(async () => ({ openAtLogin: false })), - setAutostart: vi.fn(async () => ({ openAtLogin: false })), + getAutostart: vi.fn(async () => ({ + openAtLogin: false, + diagnostic: { + withArgs: { openAtLogin: false, executableWillLaunchAtLogin: false }, + noArgs: { openAtLogin: false, executableWillLaunchAtLogin: false }, + execPath: '/p' + } + })), + setAutostart: vi.fn(async () => ({ + openAtLogin: false, + diagnostic: { + withArgs: { openAtLogin: false, executableWillLaunchAtLogin: false }, + noArgs: { openAtLogin: false, executableWillLaunchAtLogin: false }, + execPath: '/p' + } + })), runBackup: vi.fn(async () => ({ ok: true })), runExport: vi.fn(async () => ({ ok: true })), runImport: vi.fn(async () => ({ ok: true })), diff --git a/tests/unit/SettingsPage.test.tsx b/tests/unit/SettingsPage.test.tsx index 3e0fa48..16081a3 100644 --- a/tests/unit/SettingsPage.test.tsx +++ b/tests/unit/SettingsPage.test.tsx @@ -11,8 +11,22 @@ vi.mock('../../src/renderer/inbox/api.js', () => ({ loadOllamaSettings: vi.fn(async () => null), saveOllamaSettings: vi.fn(async () => ({ ok: true })), ollamaRecheck: vi.fn(async () => ({ ok: true })), - getAutostart: vi.fn(async () => ({ openAtLogin: false })), - setAutostart: vi.fn(async (open: boolean) => ({ openAtLogin: open })), + getAutostart: vi.fn(async () => ({ + openAtLogin: false, + diagnostic: { + withArgs: { openAtLogin: false, executableWillLaunchAtLogin: false }, + noArgs: { openAtLogin: false, executableWillLaunchAtLogin: false }, + execPath: '/p' + } + })), + setAutostart: vi.fn(async (open: boolean) => ({ + openAtLogin: open, + diagnostic: { + withArgs: { openAtLogin: open, executableWillLaunchAtLogin: open }, + noArgs: { openAtLogin: open, executableWillLaunchAtLogin: open }, + execPath: '/p' + } + })), runBackup: vi.fn(async () => ({ ok: true })), runExport: vi.fn(async () => ({ ok: true })), runImport: vi.fn(async () => ({ ok: true })),