feat: Renamen functionaliteit aangepast

This commit is contained in:
kodi
2026-03-12 09:38:14 +01:00
parent 8f4263c222
commit 2e897504a8
7 changed files with 324 additions and 10 deletions
Binary file not shown.
@@ -38,7 +38,7 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('id="right-items"', body)
self.assertIn('id="function-bar"', body)
self.assertIn('id="settings-btn"', body)
self.assertIn('id="rename-placeholder-btn"', body)
self.assertIn('id="rename-btn"', body)
self.assertIn('id="view-btn"', body)
self.assertIn('id="edit-btn"', body)
self.assertIn("F1", body)
@@ -51,6 +51,9 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn("F8", body)
self.assertIn('id="viewer-modal"', body)
self.assertIn('id="settings-modal"', body)
self.assertIn('id="rename-popup"', body)
self.assertIn('id="rename-input"', body)
self.assertIn('id="rename-apply-btn"', body)
self.assertIn('id="settings-general-tab"', body)
self.assertIn('id="settings-logs-tab"', body)
self.assertIn('id="settings-logs-list"', body)
@@ -77,20 +80,16 @@ class UiSmokeGoldenTest(unittest.TestCase):
ordered_ids = [
'id="settings-btn"',
'id="rename-placeholder-btn"',
'id="rename-btn"',
'id="view-btn"',
'id="edit-btn"',
'id="copy-btn"',
'id="move-btn"',
'id="rename-btn"',
'id="mkdir-btn"',
'id="delete-btn"',
]
positions = [body.index(marker) for marker in ordered_ids]
self.assertEqual(positions, sorted(positions))
rename_placeholder_index = body.index('id="rename-placeholder-btn"')
disabled_index = body.index("disabled", rename_placeholder_index)
self.assertLess(rename_placeholder_index, disabled_index)
def test_ui_static_assets_are_present_and_mapped(self) -> None:
mount = self._ui_mount()
@@ -106,6 +105,9 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('if (event.key === "F1") {', app_js)
self.assertIn('if (event.key === "F2") {', app_js)
self.assertIn('function openSettings(tab = "general")', app_js)
self.assertIn('function openRenamePopup()', app_js)
self.assertIn('document.getElementById("rename-btn").onclick = openRenamePopup;', app_js)
self.assertIn('return triggerActionButton("rename-btn");', app_js)
self.assertIn('await apiRequest("GET", "/api/history")', app_js)
self.assertIn('Cross-root directory move is not supported in v1', app_js)
self.assertIn('Batch directory move is not supported in v1', app_js)