feat: B3 uit voor veilige archive-downloads - cancel knop toegevoegd

This commit is contained in:
kodi
2026-03-14 14:39:57 +01:00
parent d463b3977d
commit 2981ac2796
24 changed files with 471 additions and 37 deletions
@@ -74,6 +74,7 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('id="download-modal-progress-bar"', body)
self.assertIn('id="download-modal-count"', body)
self.assertIn('id="download-modal-status"', body)
self.assertIn('id="download-modal-cancel-btn"', body)
self.assertIn('id="download-modal-close-btn"', body)
self.assertIn('id="context-menu"', body)
self.assertIn('id="context-menu-scope"', body)
@@ -231,11 +232,14 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('function openZipDownloadModal(selectedItems)', app_js)
self.assertIn('function markZipDownloadReady(fileName)', app_js)
self.assertIn('function markZipDownloadFailed(err)', app_js)
self.assertIn('function markZipDownloadCancelled()', app_js)
self.assertIn('function closeDownloadModal()', app_js)
self.assertIn('function zipDownloadRequestKey(paths)', app_js)
self.assertIn('async function createArchiveDownloadTask(paths)', app_js)
self.assertIn('async function getTaskRequest(taskId)', app_js)
self.assertIn('async function cancelArchiveDownloadTask(taskId)', app_js)
self.assertIn('function startArchiveDownload(taskId, fileName)', app_js)
self.assertIn('async function requestArchiveDownloadCancel()', app_js)
self.assertIn('async function waitForArchiveDownloadReady(taskId)', app_js)
self.assertIn('function contextMenuElements()', app_js)
self.assertIn('function openContextMenu(pane, entry, event)', app_js)
@@ -251,12 +255,15 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('statusText: "Download started"', app_js)
self.assertIn('countText: "Browser download started"', app_js)
self.assertIn('countText: "Zip download failed"', app_js)
self.assertIn('countText: "Zip download cancelled"', app_js)
self.assertIn('statusText: "Cancelling download..."', app_js)
self.assertIn('statusText: err.message || "Download failed"', app_js)
self.assertIn('downloadProgressState.requestKey === requestKey', app_js)
self.assertIn('setStatus("Preparing download...");', app_js)
self.assertIn('"/api/files/download/archive-prepare"', app_js)
self.assertIn('`/api/tasks/${encodeURIComponent(taskId)}`', app_js)
self.assertIn('`/api/files/download/archive/${encodeURIComponent(taskId)}`', app_js)
self.assertIn('`/api/files/download/archive/${encodeURIComponent(taskId)}/cancel`', app_js)
self.assertIn('function applyContextMenuSelection()', app_js)
self.assertIn('function startContextMenuOpen()', app_js)
self.assertIn('function startContextMenuEdit()', app_js)