test(v027): App/SettingsPage 테스트 mock 을 새 AutostartResponse 형태로 갱신
This commit is contained in:
@@ -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 })),
|
||||
|
||||
@@ -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 })),
|
||||
|
||||
Reference in New Issue
Block a user