tweak job runs

This commit is contained in:
Abel Luck 2026-03-30 14:14:59 +02:00
parent 2b2a3f1cc0
commit c210168d65
6 changed files with 94 additions and 12 deletions

View file

@ -4,6 +4,7 @@ import asyncio
from pathlib import Path
from typing import Any, cast
from repub.components import status_badge
from repub.datastar import RefreshBroker, render_sse_event, render_stream
from repub.model import (
Job,
@ -26,6 +27,13 @@ from repub.web import (
)
def test_status_badge_uses_green_done_tone() -> None:
badge = str(status_badge(label="Succeeded", tone="done"))
assert "bg-emerald-100 text-emerald-800" in badge
assert "Succeeded" in badge
def test_root_get_serves_datastar_shim() -> None:
async def run() -> None:
client = create_app().test_client()
@ -618,6 +626,8 @@ def test_render_runs_shows_running_upcoming_and_completed_tables(
assert "Completed job executions" in body
assert "runs-render-source" in body
assert f"/job/{job.id}/execution/{execution.get_id()}/logs" in body
assert "data-next-run-at" in body
assert "in " in body
assert "Already running" not in body
asyncio.run(run())