From 1fa7ca3a8cf3a9447c50cf0247941d2a95ec58a1 Mon Sep 17 00:00:00 2001 From: Mathias Date: Thu, 1 Oct 2026 18:43:48 +0200 Subject: [PATCH] test(e2e): a video file (camera-off Teams meeting) is transcribed and the user is told Run 2026-10-01 with 82 s of synthetic Swedish muxed with black video (H.264 + AAC .mp4, built with the real ffmpeg): accepted, had_video=true, transcribed by iguana/kb-whisper, the page said only its audio was used, and chat answered. Co-Authored-By: Claude Sonnet 5.5 --- cmd/tapir/e2e_upload_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cmd/tapir/e2e_upload_test.go b/cmd/tapir/e2e_upload_test.go index c4bf649..2459374 100644 --- a/cmd/tapir/e2e_upload_test.go +++ b/cmd/tapir/e2e_upload_test.go @@ -129,10 +129,16 @@ func TestE2E_UploadTranscribeAndChat(t *testing.T) { var status, endpoint, content string var secs float64 + var hadVideo bool require.NoError(t, raw.QueryRow(ctx, - `SELECT status, endpoint, content, audio_seconds FROM uploaded_transcripts WHERE user_id = $1`, uid). - Scan(&status, &endpoint, &content, &secs)) - t.Logf("done: endpoint=%s audio_s=%.1f transcript_chars=%d", endpoint, secs, len(content)) + `SELECT status, endpoint, content, audio_seconds, had_video FROM uploaded_transcripts WHERE user_id = $1`, uid). + Scan(&status, &endpoint, &content, &secs, &hadVideo)) + t.Logf("done: endpoint=%s audio_s=%.1f transcript_chars=%d had_video=%v", endpoint, secs, len(content), hadVideo) + if os.Getenv("TAPIR_E2E_HAD_VIDEO") == "1" { + // A Teams meeting with the camera off: a video file whose audio is what matters. + assert.True(t, hadVideo, "the file had a video track and the row must say so") + assert.Contains(t, page, "Only its audio was used", "and the user must be told") + } assert.Equal(t, "done", status) assert.NotEmpty(t, endpoint) assert.NotEmpty(t, content)