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 pathlib import Path
|
|
from tests.frontend_contract import read_feature
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def test_global_focus_visible_contracts_are_defined() -> None:
|
|
css = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8")
|
|
|
|
assert "--focus-ring" in css
|
|
assert "--focus-ring-soft" in css
|
|
assert "button:focus-visible" in css
|
|
assert ".nav-item:focus-visible" in css
|
|
assert ".command-chip:focus-visible" in css
|
|
assert ".inspector-tab:focus-visible" in css
|
|
assert ".dataset-action-button:focus-visible" in css
|
|
assert "outline: 3px solid var(--focus-ring);" in css
|
|
assert "outline-offset: 2px;" in css
|
|
|
|
|
|
def test_primary_navigation_has_keyboard_labels() -> None:
|
|
app = read_feature("shell")
|
|
navigation = read_feature("shell")
|
|
|
|
assert 'aria-label={`Open ${item.label}: ${item.description}`}' in navigation
|
|
assert "title={item.description}" in navigation
|
|
assert "aria-current={item.key === activeWorkspace ? 'page' : undefined}" in navigation
|
|
assert "label: 'Bronnen'" in app
|
|
assert "label: 'Kaart'" in app
|
|
assert "label: 'Kwaliteit'" in app
|
|
assert "label: 'Downloads'" in app
|
|
|
|
|
|
def test_inspector_tabs_are_bound_to_tab_panels() -> None:
|
|
inspector = read_feature("shell")
|
|
|
|
assert "const activeTabId = `inspector-tab-${activeTab}`" in inspector
|
|
assert "const activePanelId = `inspector-panel-${activeTab}`" in inspector
|
|
assert "aria-controls={`inspector-panel-${tab.key}`}" in inspector
|
|
assert "id={`inspector-tab-${tab.key}`}" in inspector
|
|
assert 'role="tabpanel"' in inspector
|
|
assert "id={activePanelId}" in inspector
|
|
assert "aria-labelledby={activeTabId}" in inspector
|