fix(download): hide URL step when file dialog opens from versions tab (#1058)

This commit is contained in:
Will Miao
2026-08-19 18:35:16 +08:00
parent e7c26bf722
commit 96376e5cce
2 changed files with 19 additions and 1 deletions
@@ -314,4 +314,19 @@ describe('DownloadManager multi-select file dialog (#1058)', () => {
const nextButton = document.getElementById('nextFromVersion');
expect(nextButton.disabled).toBe(true);
});
it('hides every other step (including the URL step) when the file dialog shows', () => {
// Regression: entering via openFileSelectionForVersion (ModelVersionsTab)
// left the URL step visible alongside the file selection step (#1058).
const manager = new DownloadManager();
manager.versions = [makeMultiFileVersion()];
document.getElementById('urlStep').style.display = 'block';
document.getElementById('versionStep').style.display = 'block';
manager.showFileSelectionStep('201');
expect(document.getElementById('urlStep').style.display).toBe('none');
expect(document.getElementById('versionStep').style.display).toBe('none');
expect(document.getElementById('fileSelectionStep').style.display).toBe('block');
});
});