GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
45 lines
1.7 KiB
Python
45 lines
1.7 KiB
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
from tests.frontend_contract import read_map_workspace, read_feature
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def test_map_workspace_exposes_feature_extract_actions() -> None:
|
|
map_workspace = read_map_workspace()
|
|
|
|
assert "Selectie en extractie" in map_workspace
|
|
assert "downloadSelectedMapFeature" in map_workspace
|
|
assert "copySelectedMapFeatureProperties" in map_workspace
|
|
assert "selected-feature.geojson" in map_workspace
|
|
assert "Geselecteerde GeoJSON downloaden" in map_workspace
|
|
assert "Eigenschappen kopiëren" in map_workspace
|
|
assert "Selectie wissen" 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 = read_feature("shell")
|
|
|
|
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
|