41 lines
1.5 KiB
Python
41 lines
1.5 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 "Officiële laag voor kaartanalyse en kwaliteitscontrole." in dataset_panel
|
|
assert "Bewaard resultaat dat opnieuw op de kaart" in dataset_panel
|
|
assert "Ingeladen gegevensbron voor verdere analyse." 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 "Bekijken" in dataset_panel
|
|
assert "Kaart" in dataset_panel
|
|
assert "Downloaden" in dataset_panel
|
|
assert "Metadata" in dataset_panel
|
|
assert "Enkel vectorlagen" in dataset_panel
|
|
assert "disabled={dataset.dataset_type === 'raster'}" 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
|