enhance: fully integrate Traceroot, enhace log system PR485

This commit is contained in:
Wendong-Fan 2025-10-16 04:26:11 +08:00
parent 83c1ffb289
commit 76fd05618a
5 changed files with 25 additions and 22 deletions

View file

@ -84,12 +84,15 @@ describe('useInstallationSetup Hook', () => {
})
it('should set initState to carousel if tool is not installed', async () => {
// Set initial state to permissions (as would happen on fresh startup)
mockAuthStore.initState = 'permissions'
// Mock tool not installed
window.ipcRenderer.invoke = vi.fn().mockResolvedValue({
success: true,
isInstalled: false
})
renderHook(() => useInstallationSetup())
await vi.waitFor(() => {
@ -197,7 +200,10 @@ describe('useInstallationSetup Hook', () => {
describe('Test Scenarios Integration', () => {
it('should handle fresh installation scenario', async () => {
TestScenarios.freshInstall(electronAPI)
// Set initial state to permissions (as would happen on fresh startup)
mockAuthStore.initState = 'permissions'
// Mock tool not installed
window.ipcRenderer.invoke = vi.fn().mockResolvedValue({
success: true,