feat: F1 en F2 en Log UI toegevoegd
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -37,8 +37,12 @@ class UiSmokeGoldenTest(unittest.TestCase):
|
||||
self.assertIn('id="left-items"', body)
|
||||
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="view-btn"', body)
|
||||
self.assertIn('id="edit-btn"', body)
|
||||
self.assertIn("F1", body)
|
||||
self.assertIn("F2", body)
|
||||
self.assertIn("F3", body)
|
||||
self.assertIn("F4", body)
|
||||
self.assertIn("F5", body)
|
||||
@@ -46,6 +50,10 @@ class UiSmokeGoldenTest(unittest.TestCase):
|
||||
self.assertIn("F7", body)
|
||||
self.assertIn("F8", body)
|
||||
self.assertIn('id="viewer-modal"', body)
|
||||
self.assertIn('id="settings-modal"', body)
|
||||
self.assertIn('id="settings-general-tab"', body)
|
||||
self.assertIn('id="settings-logs-tab"', body)
|
||||
self.assertIn('id="settings-logs-list"', body)
|
||||
self.assertIn('id="viewer-content"', body)
|
||||
self.assertIn('id="editor-modal"', body)
|
||||
self.assertIn('id="editor-content"', body)
|
||||
@@ -68,6 +76,8 @@ class UiSmokeGoldenTest(unittest.TestCase):
|
||||
self.assertNotIn('id="tasks-panel"', body)
|
||||
|
||||
ordered_ids = [
|
||||
'id="settings-btn"',
|
||||
'id="rename-placeholder-btn"',
|
||||
'id="view-btn"',
|
||||
'id="edit-btn"',
|
||||
'id="copy-btn"',
|
||||
@@ -78,6 +88,9 @@ class UiSmokeGoldenTest(unittest.TestCase):
|
||||
]
|
||||
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()
|
||||
@@ -89,6 +102,11 @@ class UiSmokeGoldenTest(unittest.TestCase):
|
||||
self.assertIn('const THEME_STORAGE_KEY = "webmanager-theme"', app_js)
|
||||
self.assertIn("document.documentElement.dataset.theme", app_js)
|
||||
self.assertIn('document.getElementById("theme-toggle").onclick = toggleTheme;', app_js)
|
||||
self.assertIn('document.getElementById("settings-btn").onclick = () => openSettings("general");', app_js)
|
||||
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('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)
|
||||
self.assertIn('Batch move requires all selected items to be in the same root', app_js)
|
||||
@@ -100,6 +118,8 @@ class UiSmokeGoldenTest(unittest.TestCase):
|
||||
self.assertIn(':root[data-theme="dark"]', style_css)
|
||||
self.assertIn(':root[data-theme="light"]', style_css)
|
||||
self.assertIn('#theme-toggle', style_css)
|
||||
self.assertIn('.settings-card', style_css)
|
||||
self.assertIn('.settings-tabs', style_css)
|
||||
|
||||
app_js_url = app.url_path_for("ui", path="/app.js")
|
||||
style_css_url = app.url_path_for("ui", path="/style.css")
|
||||
|
||||
Reference in New Issue
Block a user