Files
geointel/backend/tests/test_sprint72_mobile_overflow_hardening.py
T
Jens faeb58ef6d
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
Initial public release
2026-08-31 21:56:53 +02:00

45 lines
1.7 KiB
Python

from __future__ import annotations
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
def test_mobile_overflow_hardening_css_contracts() -> None:
css = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8")
assert "overflow-x: hidden;" in css
assert ".workbench-shell" in css
assert "max-width: 100vw;" in css
assert ".workbench-sidebar nav" in css
assert ".workspace-nav-cluster" in css
assert ".inspector-tabs" in css
assert "repeat(2, minmax(0, 1fr))" in css
assert "overflow-x: clip;" in css
assert "overscroll-behavior-x: contain;" in css
assert (
"section > div:not(.map-controls):not(.feature-inspector):not(.quick-action-grid)"
":not(.geo-explorer-layout)"
) in css
explorer_mobile_css = css.split("@media (max-width: 920px)", 1)[1]
explorer_mobile_rule = explorer_mobile_css.split(".geo-explorer-layout", 1)[1]
assert "display: block;" in explorer_mobile_rule.split("}", 1)[0]
compact_mobile_css = css.rsplit("@media (max-width: 620px)", 1)[1]
compact_theme_rule = compact_mobile_css.split(".geo-theme-list {", 1)[1].split("}", 1)[0]
assert "max-height: 16rem;" in compact_theme_rule
assert "overflow-y: auto;" in compact_theme_rule
assert "overscroll-behavior-y: contain;" in compact_theme_rule
def test_long_identifier_wrapping_contracts() -> None:
css = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8")
assert ".quality-check-dataset-link" in css
assert ".quality-score-row strong" in css
assert ".inspector-field strong" in css
assert "overflow-wrap: anywhere;" in css
assert "word-break: break-word;" in css