Polish workbench workspace usability
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
def test_data_workspace_panels_use_operator_friendly_cards_and_forms() -> None:
|
||||
project_panel = (ROOT / "frontend" / "src" / "components" / "project" / "ProjectPanel.tsx").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
area_panel = (ROOT / "frontend" / "src" / "components" / "project" / "AreaPanel.tsx").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
dataset_panel = (ROOT / "frontend" / "src" / "components" / "datasets" / "DatasetPanel.tsx").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
|
||||
assert "compact-form" in project_panel
|
||||
assert "entity-card-active" in project_panel
|
||||
assert "AOI manager" in area_panel
|
||||
assert "compact-form" in area_panel
|
||||
assert "entity-card-active" in area_panel
|
||||
assert "dataset-upload-form" in dataset_panel
|
||||
assert "dataset-card" in dataset_panel
|
||||
assert "status-badge-ready" in dataset_panel
|
||||
|
||||
|
||||
def test_map_and_ai_workspaces_use_task_blocks_not_raw_stacks() -> None:
|
||||
map_workspace = (ROOT / "frontend" / "src" / "components" / "map" / "MapWorkspace.tsx").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
detection_lab = (ROOT / "frontend" / "src" / "components" / "detection" / "DetectionLab.tsx").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
segmentation_lab = (
|
||||
ROOT / "frontend" / "src" / "components" / "segmentation" / "SegmentationLab.tsx"
|
||||
).read_text(encoding="utf-8")
|
||||
styles = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8")
|
||||
|
||||
assert "map-toolbar" in map_workspace
|
||||
assert "layer-control-card" in map_workspace
|
||||
assert "Spatial review" in map_workspace
|
||||
assert "model-list" in detection_lab
|
||||
assert "lab-block" in detection_lab
|
||||
assert "lab-form-grid" in detection_lab
|
||||
assert "model-list" in segmentation_lab
|
||||
assert "lab-block" in segmentation_lab
|
||||
assert ".dataset-upload-form" in styles
|
||||
assert ".map-toolbar" in styles
|
||||
assert ".workspace-grid-ai .lab-form-grid" in styles
|
||||
Reference in New Issue
Block a user