From ac530de91a062d738c4d5c06c4b1348cb6fd14f2 Mon Sep 17 00:00:00 2001 From: Mathias Date: Fri, 2 Oct 2026 17:19:32 +0200 Subject: [PATCH] test: a shortfall is noted on the audio step, not refused; the 80%, two-minute and 30-second tolerances are pinned (red; second review finding 1) Co-Authored-By: Claude Sonnet 5.5 --- internal/web/uploads_progress_handler_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/internal/web/uploads_progress_handler_test.go b/internal/web/uploads_progress_handler_test.go index 0d325e2..4a7f6ed 100644 --- a/internal/web/uploads_progress_handler_test.go +++ b/internal/web/uploads_progress_handler_test.go @@ -251,3 +251,18 @@ func TestUploadProgress_TheFullPageCarriesTheVerySameProgressListAsTheFragment(t assert.Equal(t, stepsBlock(t, fragment), stepsBlock(t, full), "the page a user opens and the fragment HTMX swaps in must show the same list, or the display jumps on the first poll") } + +func TestUploadProgress_AStepNoteIsShownUnderItsStepAndEscaped(t *testing.T) { + app, _ := newUploadApp(t, audioOK, 200<<20) + fixedClock(app) + id := seedUpload(t, userID, "m", "transcribing", "") + steps := twoEngineRun() + steps[1].Note = "The audio is 20 min long; the file claimed 1 h 19 min. cut off?" + seedProgress(t, id, steps, progressNow.Add(-10*time.Second), progressNow.Add(-4*time.Second)) + + b := statusBody(t, app, id) + + assert.Contains(t, b, "The audio is 20 min long") + assert.Contains(t, b, "step-note") + assert.NotContains(t, b, "cut off", "a note is words, never markup") +}