Merge branch 'fix/video-poster-race'
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user