Files
geointel/backend/tests/test_sprint85_map_workspace_density.py
T
NuklearRabbit edb762219c
Managed validation / full (pull_request) Canceled after 0s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (pull_request) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Failing after 22s
GeoIntel release gates / Compile, test, contracts and builds (push) Waiting to run
GeoIntel release gates / GIS image, SBOM and container scan (push) Failing after 45s
fix(ci): restore release gates and contract baseline (fixes #4)
2026-08-29 02:00:23 +02:00

57 lines
2.4 KiB
Python

from __future__ import annotations
from pathlib import Path
from tests.frontend_contract import read_feature
ROOT = Path(__file__).resolve().parents[2]
def test_map_workspace_exposes_structured_surfaces() -> None:
map_workspace = read_feature("map_workspace")
assert 'className="map-workspace-shell"' in map_workspace
assert 'className="map-context-summary"' in map_workspace
assert 'aria-label="Status van de kaartlagen"' in map_workspace
assert 'className="map-control-surface"' in map_workspace
assert 'aria-label="Bediening van de kaartwerkruimte"' in map_workspace
assert 'className="map-frame-surface"' in map_workspace
assert 'className="map-inspection-surface"' in map_workspace
def test_map_workspace_summary_uses_current_layer_and_selection_state() -> None:
map_workspace = read_feature("map_workspace")
assert "const selectedMapArea = areas.find" in map_workspace
assert "selectedMapArea?.name ?? 'Geen gebied geselecteerd'" in map_workspace
assert "mapLayerLabel" in map_workspace
assert "mapLayerSourceLabel" in map_workspace
assert "mapFeatureCount" in map_workspace
assert "areaFeatureCount" in map_workspace
def test_map_workspace_density_css_contracts() -> None:
css = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8")
assert ".map-workspace-shell" in css
assert ".map-context-summary" in css
assert ".map-context-summary > div" in css
assert ".map-control-surface" in css
assert ".map-frame-surface" in css
assert ".map-inspection-surface" in css
assert ".map-workspace-shell .map-toolbar" in css
assert "grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));" in css
assert "background: linear-gradient(180deg, var(--gi-surface), var(--gi-brand-50));" in css
assert "border-left: 4px solid var(--accent);" in css
def test_map_workspace_mobile_controls_remain_compact() -> None:
css = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8")
assert ".map-workspace-shell .map-context-summary" in css
assert ".map-workspace-shell .map-toolbar" in css
assert ".map-workspace-shell .layer-provenance-rail" in css
assert "grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr));" in css
assert "grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));" in css
assert ".map-control-surface," in css