Add map feature extraction workflow
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
def test_map_workspace_exposes_feature_extract_actions() -> None:
|
||||
map_workspace = (ROOT / "frontend" / "src" / "components" / "map" / "MapWorkspace.tsx").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
|
||||
assert "Selection & extract" in map_workspace
|
||||
assert "downloadSelectedMapFeature" in map_workspace
|
||||
assert "copySelectedMapFeatureProperties" in map_workspace
|
||||
assert "selected-feature.geojson" in map_workspace
|
||||
assert "Download selected GeoJSON" in map_workspace
|
||||
assert "Copy selected properties" in map_workspace
|
||||
assert "Clear selection" in map_workspace
|
||||
assert "featureGeometrySummary" in map_workspace
|
||||
assert "featureExtractionEntries" in map_workspace
|
||||
|
||||
|
||||
def test_geomap_highlights_selected_feature_layer() -> None:
|
||||
geomap = (ROOT / "frontend" / "src" / "components" / "GeoMap.tsx").read_text(encoding="utf-8")
|
||||
app = (ROOT / "frontend" / "src" / "App.tsx").read_text(encoding="utf-8")
|
||||
|
||||
assert "selectedFeature?: GeoJSON.Feature | null" in geomap
|
||||
assert "selected-feature" in geomap
|
||||
assert "selected-feature-fill" in geomap
|
||||
assert "selected-feature-line" in geomap
|
||||
assert "selected-feature-circle" in geomap
|
||||
assert "selectedFeature={selectedMapFeature}" in app
|
||||
|
||||
|
||||
def test_feature_extract_css_is_responsive_and_scannable() -> None:
|
||||
css = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8")
|
||||
|
||||
assert ".feature-extract-surface" in css
|
||||
assert ".feature-extract-grid" in css
|
||||
assert ".feature-extract-actions" in css
|
||||
assert ".feature-property-table" in css
|
||||
assert ".feature-extract-empty" in css
|
||||
assert "grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));" in css
|
||||
Reference in New Issue
Block a user