refactor(runtime): gate settings backup file save by capability

This commit is contained in:
4gray committed 2026-05-22 13:41:24 +03:00
1 parent c9a0d5210e
commit 582422c512
4 files changed
+81 -2

No files matched your search

@@ -258,6 +258,24 @@ describe('RuntimeCapabilitiesService', () => {
expect(service.supportsDownloads).toBe(true);
});
it('requires both desktop file-save preload methods', () => {
testWindow.electron = {
saveFileDialog: jest.fn(),
};
const service = new RuntimeCapabilitiesService();
expect(service.isElectron).toBe(true);
expect(service.supportsDesktopFileSave).toBe(false);
testWindow.electron = {
saveFileDialog: jest.fn(),
writeFile: jest.fn(),
};
expect(service.supportsDesktopFileSave).toBe(true);
});
it('requires the complete playlist refresh preload surface', () => {
testWindow.electron = {
refreshPlaylist: jest.fn(),