feat: contextmenu deel 3a rename en delete

This commit is contained in:
kodi
2026-03-14 09:41:16 +01:00
parent 7bb59a2b65
commit 054e736aa6
6 changed files with 60 additions and 3 deletions
Binary file not shown.
@@ -71,7 +71,8 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('id="context-menu"', body)
self.assertIn('id="context-menu-scope"', body)
self.assertIn('id="context-menu-target"', body)
self.assertIn('id="context-menu-open-placeholder"', body)
self.assertIn('id="context-menu-rename-btn"', body)
self.assertIn('id="context-menu-delete-btn"', body)
self.assertIn('id="settings-btn"', body)
self.assertIn('id="rename-btn"', body)
self.assertIn('id="view-btn"', body)
@@ -207,12 +208,18 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('function contextMenuElements()', app_js)
self.assertIn('function openContextMenu(pane, entry, event)', app_js)
self.assertIn('function closeContextMenu()', app_js)
self.assertIn('function applyContextMenuSelection()', app_js)
self.assertIn('function startContextMenuRename()', app_js)
self.assertIn('function startContextMenuDelete()', app_js)
self.assertIn('selectedPathsSet.has(entry.path)', app_js)
self.assertIn('entry.isParent', app_js)
self.assertIn('row.oncontextmenu = (event) => {', app_js)
self.assertIn('event.target.closest("li[data-row-index]")', app_js)
self.assertIn('if (!row) {', app_js)
self.assertIn('closeContextMenu();', app_js)
self.assertIn('elements.renameButton.classList.toggle("hidden", isMulti);', app_js)
self.assertIn('openRenamePopup();', app_js)
self.assertIn('deleteSelected();', app_js)
self.assertIn('document.getElementById("upload-menu-toggle").onclick = (event) => {', app_js)
self.assertIn('document.getElementById("upload-folder-btn").onclick = openFolderPicker;', app_js)
self.assertIn('throw createApiError(response, data);', app_js)