mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-13 12:36:15 -08:00
fix: clear external player paths on save
Entire-Checkpoint: f957cd9849e0
This commit is contained in:
1 parent
2efdfea0c1
commit
4a21579aff
4 files changed
+111
-22
No files matched your search
@@ -925,4 +925,28 @@ describe('SettingsComponent', () => {
|
||||
component.settingsForm.value
|
||||
);
|
||||
});
|
||||
|
||||
it('clears external player paths in Electron when saved as empty', async () => {
|
||||
const mockStore = settingsStore as unknown as MockSettingsStore;
|
||||
mockStore.updateSettings.mockResolvedValue(undefined);
|
||||
const setMpvPlayerPath = jest.spyOn(
|
||||
window.electron,
|
||||
'setMpvPlayerPath'
|
||||
);
|
||||
const setVlcPlayerPath = jest.spyOn(
|
||||
window.electron,
|
||||
'setVlcPlayerPath'
|
||||
);
|
||||
|
||||
component.settingsForm.patchValue({
|
||||
mpvPlayerPath: '',
|
||||
vlcPlayerPath: '',
|
||||
});
|
||||
|
||||
component.onSubmit();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(setMpvPlayerPath).toHaveBeenCalledWith('');
|
||||
expect(setVlcPlayerPath).toHaveBeenCalledWith('');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user