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
48 lines
1.7 KiB
Python
48 lines
1.7 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_app_uses_dataset_presentational_components() -> None:
|
|
app = read_feature("shell")
|
|
inspector = read_feature("shell")
|
|
|
|
assert "from './components/datasets/DatasetPanel'" in app
|
|
assert "from './components/inspector/WorkbenchInspector'" in app
|
|
assert "<DatasetPanel" in app
|
|
assert "<WorkbenchInspector" in app
|
|
assert "from '../datasets/DatasetDetailPanel'" in inspector
|
|
assert "<DatasetDetailPanel {...datasetDetailProps} />" in inspector
|
|
assert "<form onSubmit={uploadDataset}" not in app
|
|
assert "<h3>Rasterbewerkingen</h3>" not in app
|
|
assert "<h3>Vectorbewerkingen</h3>" not in app
|
|
|
|
|
|
def test_dataset_panel_owns_upload_and_list_markup() -> None:
|
|
panel = read_feature("datasets")
|
|
|
|
assert "Eigen bronbestand toevoegen" in panel
|
|
assert "Metadata vernieuwen" in panel
|
|
assert "Details en acties" in panel
|
|
assert "onLoadDatasetDetails" in panel
|
|
assert "onRefreshMetadata" in panel
|
|
|
|
|
|
def test_dataset_detail_panel_composes_raster_and_vector_controls() -> None:
|
|
detail_panel = read_feature("datasets")
|
|
raster_controls = read_feature("datasets")
|
|
vector_controls = read_feature("datasets")
|
|
|
|
assert "<RasterControls" in detail_panel
|
|
assert "<VectorControls" in detail_panel
|
|
assert "Technische verwerking" in detail_panel
|
|
assert "Rasterbewerkingen" in raster_controls
|
|
assert "NDVI berekenen" in raster_controls
|
|
assert "Beeldtegels maken" in raster_controls
|
|
assert "Vectorbewerkingen" in vector_controls
|
|
assert "Overlap berekenen" in vector_controls
|