feat(downloads): prefill Add modal from clipboard (#10)

This commit is contained in:
NimBold
2026-07-11 09:01:44 +03:30
parent 629a34d1e8
commit ba70662165
9 changed files with 423 additions and 12 deletions
+10
View File
@@ -93,6 +93,16 @@ describe('useDownloadStore', () => {
});
});
it('invalidates in-flight Add-modal handoffs when the modal is toggled', () => {
const initialVersion = useDownloadStore.getState().pendingAddRequestVersion;
useDownloadStore.getState().toggleAddModal(true);
expect(useDownloadStore.getState().pendingAddRequestVersion).toBe(initialVersion + 1);
useDownloadStore.getState().toggleAddModal(false);
expect(useDownloadStore.getState().pendingAddRequestVersion).toBe(initialVersion + 2);
});
it('normalizes proxy settings for download dispatch', async () => {
expect(normalizeCustomProxy('127.0.0.1', 8080)).toBe('http://127.0.0.1:8080');
expect(normalizeCustomProxy('http://proxy.local:9000', 8080)).toBe('http://proxy.local:9000');