Refactor workbench into task-based UI shell
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
def test_app_uses_task_based_workbench_shell() -> None:
|
||||
app = (ROOT / "frontend" / "src" / "App.tsx").read_text(encoding="utf-8")
|
||||
|
||||
assert "type WorkspaceKey" in app
|
||||
assert "workspaceNavItems" in app
|
||||
assert 'data-testid={`workspace-nav-${item.key}`}' in app
|
||||
assert 'className="workbench-layout"' in app
|
||||
assert 'className="workbench-sidebar"' in app
|
||||
assert 'className="workbench-main"' in app
|
||||
assert 'className="workbench-inspector"' in app
|
||||
assert "activeWorkspace === 'data'" in app
|
||||
assert "activeWorkspace === 'map'" in app
|
||||
assert "activeWorkspace === 'analysis'" in app
|
||||
assert "activeWorkspace === 'ai'" in app
|
||||
assert "activeWorkspace === 'exports'" in app
|
||||
assert "activeWorkspace === 'system'" in app
|
||||
|
||||
|
||||
def test_workbench_shell_css_provides_navigation_main_and_inspector_regions() -> None:
|
||||
css = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8")
|
||||
|
||||
assert ".workbench-topbar" in css
|
||||
assert ".context-bar" in css
|
||||
assert ".workbench-layout" in css
|
||||
assert ".workbench-sidebar" in css
|
||||
assert ".nav-item-active" in css
|
||||
assert ".workbench-main" in css
|
||||
assert ".workbench-inspector" in css
|
||||
assert ".workspace-grid-data" in css
|
||||
assert ".workspace-grid-ai" in css
|
||||
Reference in New Issue
Block a user