add empty table placeholders

This commit is contained in:
Abel Luck 2026-03-30 15:28:56 +02:00
parent 8716579508
commit 0803617e62
5 changed files with 60 additions and 6 deletions

View file

@ -215,6 +215,20 @@ def test_render_dashboard_shows_dashboard_information_architecture(
asyncio.run(run())
def test_render_dashboard_shows_empty_state_rows(monkeypatch, tmp_path: Path) -> None:
db_path = tmp_path / "dashboard-empty.db"
monkeypatch.setenv("REPUBLISHER_DB_PATH", str(db_path))
async def run() -> None:
app = create_app()
body = str(await render_dashboard(app))
assert "No job executions are running." in body
assert "No feeds have been published yet." in body
asyncio.run(run())
def test_load_dashboard_view_measures_log_artifact_path(
monkeypatch, tmp_path: Path
) -> None:
@ -390,6 +404,7 @@ def test_render_sources_shows_table_and_create_link() -> None:
assert ">Sources<" in body
assert 'href="/sources/create"' in body
assert "No sources yet." in body
assert "guardian-feed" not in body
assert "podcast-audio" not in body
@ -840,6 +855,21 @@ def test_render_runs_shows_running_upcoming_and_completed_tables(
asyncio.run(run())
def test_render_runs_shows_empty_state_rows(monkeypatch, tmp_path: Path) -> None:
db_path = tmp_path / "runs-empty.db"
monkeypatch.setenv("REPUBLISHER_DB_PATH", str(db_path))
async def run() -> None:
app = create_app()
body = str(await render_runs(app))
assert body.count("No job executions are running.") == 1
assert "No jobs are scheduled." in body
assert "No job executions have completed yet." in body
asyncio.run(run())
def test_render_execution_logs_uses_app_route(monkeypatch, tmp_path: Path) -> None:
db_path = tmp_path / "logs-render.db"
monkeypatch.setenv("REPUBLISHER_DB_PATH", str(db_path))