| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| def read(path: str) -> str: | |
| return (ROOT / path).read_text(encoding="utf-8") | |
| def test_v105_uses_delegated_events_and_deduped_run_refresh(): | |
| runs = read("web/static/runs.js") | |
| assert "function bindRunRowEvents" in runs | |
| assert "root.dataset.boundRuns" in runs | |
| assert "state.runsLoadPromise" in runs | |
| assert "root.dataset.signature" in runs | |
| def test_v105_endpoint_picker_is_delegated_and_latency_is_precise(): | |
| app = read("web/static/app.js") | |
| assert "function bindValidationEndpointPicker" in app | |
| assert "root.dataset.boundEndpointPicker" in app | |
| assert "function firstPositiveNumber" in app | |
| assert "function formatLatencySeconds" in app | |
| assert "source||'live smoke test'" in app | |
| def test_v105_activity_feed_is_lighter_and_does_not_force_scroll_after_user_scroll(): | |
| progress = read("web/static/progress.js") | |
| assert ".slice(-30).reverse()" in progress | |
| assert "shouldKeepLatestVisible" in progress | |
| assert "if(shouldKeepLatestVisible)root.scrollTop=0" in progress | |
| css = read("web/static/app.css") | |
| assert "v105: UI cleanup" in css | |
| assert "overscroll-behavior:contain" in css | |