Lock and seal closed runs; feedback with the closing form; Home headlines link to their sections; drop the back link
Some checks failed
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 3s
Work Records / validate (push) Has been cancelled

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: sonnet
Assistant-Process: 295952@bnt-lap001
Assistant-Session: e93f64ad-516c-46eb-9666-aad8d300c477
This commit is contained in:
tegwick 2026-09-29 18:03:12 +02:00
parent b7edb8f023
commit 711c4e1149
13 changed files with 381 additions and 42 deletions

View file

@ -205,18 +205,18 @@ def test_feedback_form_after_all_steps_done_and_recording(srv):
t, loc, _ = _showcase_run(srv)
base = loc.split("#")[0]
_, _, body = req(srv, "GET", base)
assert "How was this runbook?" not in body # not before the run is complete
assert "<h2>How was this runbook?</h2>" not in body # not before the run is complete
_finish_showcase(srv, t, base)
_, _, body = req(srv, "GET", base)
assert "All steps done." in body and "How was this runbook?" in body
assert body.index("All steps done.") < body.index("How was this runbook?")
assert "All steps done." in body and "<h2>How was this runbook?</h2>" in body
assert body.index("All steps done.") < body.index("<h2>How was this runbook?</h2>")
assert "🙂" in body and "😐" in body and "🙁" in body and "name=comment" in body
st, loc2, _ = req(srv, "POST", base + "/feedback", {"_t": t, "rating": "neutral", "comment": "step 3 was unclear"})
assert st == 303 and loc2.endswith("#feedback")
_, _, body = req(srv, "GET", base)
assert "Thank you." in body and "step 3 was unclear" in body
assert "How was this runbook?" not in body # the section closed once feedback was collected
assert "<a href='/'>← Back to the runbook list</a>" in body # the probable next step
assert "<h2>How was this runbook?</h2>" not in body # the section closed once feedback was collected
assert "Back to the runbook list" not in body # the sidebar's Home replaces that link
assert "Change my feedback" in body # the form is still reachable, folded away
assert req(srv, "GET", "/")[0] == 200