diff --git a/e2e/specs/03-feed/video-playback.spec.ts b/e2e/specs/03-feed/video-playback.spec.ts index dbbd6a4..1fb8bc4 100644 --- a/e2e/specs/03-feed/video-playback.spec.ts +++ b/e2e/specs/03-feed/video-playback.spec.ts @@ -40,10 +40,19 @@ test.describe('Video — the lightbox plays it', () => { page, guest, signIn, + db, }) => { const g = await guest('VideoWatcher'); const id = await seedVideo(g.jwt); + // The poster assertion below needs the ffmpeg thumbnail to EXIST — the lightbox binds + // `poster={upload.thumbnail_url ?? undefined}`, so the attribute is simply absent until + // compression finishes. Without this wait the test races the worker and fails against a + // cold stack (first run after `stack:down -v`, cold ffmpeg), which is exactly when a suite + // is least likely to be believed. The `src` assertion is unconditional; only the poster + // needs the wait. + await expect.poll(() => db.compressionStatus(id), { timeout: 60_000 }).toBe('done'); + await signIn(page, g); await page.goto('/feed');