agentic-space-factory-UI-public / tests /test_v64_delete_clean_events_timeline.py
fffiloni's picture
Upload 37 files
da65740 verified
Raw
History Blame
2.08 kB
from pathlib import Path
def test_delete_selected_run_resets_active_run_every_time():
runs = Path("web/static/runs.js").read_text(encoding="utf-8")
assert "async function deleteSelectedRun" in runs
assert "resetRunDetails();" in runs
assert "state.selectedRunDetail=null" in runs
assert "state.activeLinks={}" in runs
assert "document.querySelectorAll('.run-row')" in runs
def test_reset_run_details_clears_active_run_panels():
app = Path("web/static/app.js").read_text(encoding="utf-8")
reset = app.split("function resetRunDetails()", 1)[1].split("function prepareNewBuild()", 1)[0]
for token in [
"progressTitle",
"progressStatus",
"currentStep",
"lastEvent",
"progressPercent",
"activityFeed",
"artifactList",
"deleteSelectedRun",
"renderTimeline(DEFAULT_TIMELINE,'idle')",
]:
assert token in reset
def test_events_are_compact_by_default_and_expand_in_same_list():
html = Path("web/index.html").read_text(encoding="utf-8")
js = Path("web/static/progress.js").read_text(encoding="utf-8")
css = Path("web/static/app.css").read_text(encoding="utf-8")
assert "allEventsPanel" not in html
assert "eventsPanel" not in html.split("latest-events-card", 1)[1].split("report-card", 1)[0]
assert "activityFeedState={lastItems:[]" in js
assert "const visible=[...list].reverse()" in js
assert "toggleAllEvents" not in js
assert "max-height:184px" in css
def test_timeline_has_stopped_state_without_running_animation_confusion():
js = Path("web/static/progress.js").read_text(encoding="utf-8")
css = Path("web/static/app.css").read_text(encoding="utf-8")
assert "status-stopped" in js
assert "status-muted" in js
assert "PROGRESS_TERMINAL_STATUSES.has(overall)" in js
assert ".step.status-stopped .step-dot" in css
assert "animation:none!important" in css
def test_app_version_v64():
assert '"version": "v70-progress-resume-events-latency"' in Path("app.py").read_text(encoding="utf-8")