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") +}