test(docker): a plugin template can take its own name; the overview's assertions follow its new tables (#5299, #5302)
render_plugin_template's first three arguments are positional-only, so the service page's own `name` reaches the template. The overview names a service rather than its replica containers, and a stack chip keeps the search it was clicked under. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -265,11 +265,14 @@ def test_docker_and_agent_tools_over_seeded_rows(app):
|
||||
sess["user_id"], sess["user_role"], sess["username"] = viewer_id, "viewer", "viewer"
|
||||
sess["login_at"] = time.time()
|
||||
topo = await (await client.get("/plugins/docker/swarm")).get_data(as_text=True)
|
||||
assert svc in topo and "1 task failed in the last 24h" in topo
|
||||
assert f'href="/plugins/docker/service/{svc}"' in topo # short of replicas: named first
|
||||
assert "task: non-zero exit (1)" in topo
|
||||
cards = await (await client.get("/plugins/docker/rows")).get_data(as_text=True)
|
||||
assert f"{svc}.1.abc" in cards and replaced not in cards
|
||||
assert f'href="/plugins/docker/service/{svc}"' in cards and replaced not in cards
|
||||
assert "task: non-zero exit (1)" in cards
|
||||
# The overview names the service; its own page names its live replica.
|
||||
page = await (await client.get(f"/plugins/docker/service/{svc}")).get_data(as_text=True)
|
||||
assert f"{svc}.1.abc" in page and replaced not in page
|
||||
assert (await client.get("/plugins/docker/widget")).status_code == 200
|
||||
|
||||
# ── host agents ────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user