[Electron] Fix initial default install location validation (#1592)

This commit is contained in:
Chenlei Hu
2024-11-18 20:10:22 -05:00
committed by GitHub
parent fc9e347055
commit 88164bdac5
3 changed files with 14 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ const mockElectronAPI: Plugin = {
Promise.resolve({
appData: 'C:/Users/username/AppData/Roaming',
appPath: 'C:/Program Files/comfyui-electron/resources/app',
defaultInstallPath: 'C:/Users/username/comfyui-electron'
defaultInstallPath: 'bad'
}),
validateInstallPath: (path) => {
if (path === 'bad') {
@@ -42,7 +42,12 @@ const mockElectronAPI: Plugin = {
}
return { isValid: true }
},
showDirectoryPicker: () => Promise.resolve('C:/Users/username/comfyui-electron/1')
showDirectoryPicker: () => Promise.resolve('C:/Users/username/comfyui-electron/1'),
DownloadManager: {
getAllDownloads: () => Promise.resolve([]),
onDownloadProgress: () => {}
},
getElectronVersion: () => Promise.resolve('1.0.0')
};`
}
]