41 lines
1.4 KiB
Python
41 lines
1.4 KiB
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def test_dataset_panel_explains_recommended_actions() -> None:
|
|
dataset_panel = (ROOT / "frontend" / "src" / "components" / "datasets" / "DatasetPanel.tsx").read_text(
|
|
encoding="utf-8"
|
|
)
|
|
|
|
assert "datasetActionHint" in dataset_panel
|
|
assert "dataset-action-hint" in dataset_panel
|
|
assert "QA reference layer" in dataset_panel
|
|
assert "QA candidate layer" in dataset_panel
|
|
assert "Open on the map or send to Export / QA." in dataset_panel
|
|
|
|
|
|
def test_dataset_buttons_have_scan_friendly_action_copy() -> None:
|
|
dataset_panel = (ROOT / "frontend" / "src" / "components" / "datasets" / "DatasetPanel.tsx").read_text(
|
|
encoding="utf-8"
|
|
)
|
|
|
|
assert "dataset-action-grid" in dataset_panel
|
|
assert "Inspect" in dataset_panel
|
|
assert "Map" in dataset_panel
|
|
assert "Export / QA" in dataset_panel
|
|
assert "Metadata" in dataset_panel
|
|
assert "Vector/GeoJSON only" in dataset_panel
|
|
assert "Raster metadata is automatic" in dataset_panel
|
|
|
|
|
|
def test_dataset_action_styles_keep_buttons_dense_and_responsive() -> None:
|
|
css = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8")
|
|
|
|
assert ".dataset-action-hint" in css
|
|
assert ".dataset-action-grid" in css
|
|
assert "repeat(auto-fit, minmax(8.75rem, 1fr))" in css
|
|
assert ".dataset-action-button" in css
|
|
assert ".dataset-action-button small" in css
|