Bigger text in test dashboard + add deliberate failing test
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m18s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 20:34:19 +00:00
parent c926e5221d
commit 3dd62bd9bf
2 changed files with 24 additions and 19 deletions

View File

@@ -0,0 +1,5 @@
"""Deliberate failing test to verify test dashboard shows failures."""
def test_this_should_fail():
assert 1 == 2, "Deliberate failure to test dashboard display"

View File

@@ -21,30 +21,30 @@
(div :class "space-y-4"
(div :class "flex items-center justify-between flex-wrap gap-3"
(div :class "flex items-center gap-3"
(h2 :class "text-lg font-semibold text-stone-800" "Test Results")
(h2 :class "text-2xl font-semibold text-stone-800" "Test Results")
(when status (~test-status-badge :status status)))
(~test-run-button :running running :csrf csrf))
(when status
(div :class "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-3"
(div :class "rounded border border-stone-200 bg-white p-3 text-center"
(div :class "text-2xl font-bold text-stone-800" total)
(div :class "text-xs text-stone-500" "Total"))
(div :class "text-3xl font-bold text-stone-800" total)
(div :class "text-sm text-stone-500" "Total"))
(div :class "rounded border border-emerald-200 bg-emerald-50 p-3 text-center"
(div :class "text-2xl font-bold text-emerald-700" passed)
(div :class "text-xs text-emerald-600" "Passed"))
(div :class "text-3xl font-bold text-emerald-700" passed)
(div :class "text-sm text-emerald-600" "Passed"))
(div :class "rounded border border-rose-200 bg-rose-50 p-3 text-center"
(div :class "text-2xl font-bold text-rose-700" failed)
(div :class "text-xs text-rose-600" "Failed"))
(div :class "text-3xl font-bold text-rose-700" failed)
(div :class "text-sm text-rose-600" "Failed"))
(div :class "rounded border border-orange-200 bg-orange-50 p-3 text-center"
(div :class "text-2xl font-bold text-orange-700" errors)
(div :class "text-xs text-orange-600" "Errors"))
(div :class "text-3xl font-bold text-orange-700" errors)
(div :class "text-sm text-orange-600" "Errors"))
(div :class "rounded border border-sky-200 bg-sky-50 p-3 text-center"
(div :class "text-2xl font-bold text-sky-700" skipped)
(div :class "text-xs text-sky-600" "Skipped"))
(div :class "text-3xl font-bold text-sky-700" skipped)
(div :class "text-sm text-sky-600" "Skipped"))
(div :class "rounded border border-stone-200 bg-white p-3 text-center"
(div :class "text-2xl font-bold text-stone-800" (str duration "s"))
(div :class "text-xs text-stone-500" "Duration")))
(div :class "text-xs text-stone-400" (str "Last run: " last-run)))))
(div :class "text-3xl font-bold text-stone-800" (str duration "s"))
(div :class "text-sm text-stone-500" "Duration")))
(div :class "text-sm text-stone-400" (str "Last run: " last-run)))))
(defcomp ~test-row (&key nodeid outcome duration longrepr)
(tr :class (str "border-b border-stone-100 "
@@ -52,16 +52,16 @@
(if (= outcome "failed") "bg-rose-50"
(if (= outcome "skipped") "bg-sky-50"
"bg-orange-50"))))
(td :class "px-3 py-2 text-xs font-mono text-stone-700 max-w-0 truncate" :title nodeid nodeid)
(td :class "px-3 py-2 text-sm font-mono text-stone-700 max-w-0 truncate" :title nodeid nodeid)
(td :class "px-3 py-2 text-center"
(span :class (str "inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-medium "
(span :class (str "inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium "
(if (= outcome "passed") "border-emerald-300 bg-emerald-50 text-emerald-700"
(if (= outcome "failed") "border-rose-300 bg-rose-50 text-rose-700"
(if (= outcome "skipped") "border-sky-300 bg-sky-50 text-sky-700"
"border-orange-300 bg-orange-50 text-orange-700"))))
outcome))
(td :class "px-3 py-2 text-right text-xs text-stone-500 tabular-nums" (str duration "s"))
(td :class "px-3 py-2 text-xs text-rose-600 font-mono max-w-xs truncate" :title longrepr
(td :class "px-3 py-2 text-right text-sm text-stone-500 tabular-nums" (str duration "s"))
(td :class "px-3 py-2 text-sm text-rose-600 font-mono max-w-xs truncate" :title longrepr
(when longrepr longrepr))))
(defcomp ~test-results-table (&key rows-html has-failures)
@@ -69,7 +69,7 @@
(table :class "w-full text-left"
(thead
(tr :class "border-b border-stone-200 bg-stone-50"
(th :class "px-3 py-2 text-xs font-medium text-stone-600" "Test")
(th :class "px-3 py-2 text-sm font-medium text-stone-600" "Test")
(th :class "px-3 py-2 text-xs font-medium text-stone-600 text-center w-24" "Status")
(th :class "px-3 py-2 text-xs font-medium text-stone-600 text-right w-20" "Time")
(th :class "px-3 py-2 text-xs font-medium text-stone-600 w-48" "Error")))