Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

test(dashboard): await audio arrival notification

Yudhi Armyndharisc9f4d1f61198
diff --git a/dashboard/src/components/chats/ArchivedMediaPreview.test.ts b/dashboard/src/components/chats/ArchivedMediaPreview.test.ts
index 34c8423e6..c8c3da46d 100644
--- a/dashboard/src/components/chats/ArchivedMediaPreview.test.ts
+++ b/dashboard/src/components/chats/ArchivedMediaPreview.test.ts
@@ -255,7 +255,7 @@ test('an archived audio player reports its arrival so a bottom-pinned thread sta
}),
);
await rtl.waitFor(() => assert.ok(container.querySelector('audio.chat-audio-media'), 'audio did not render'));
- assert.equal(reports, 1, 'the thread is told once that the placeholder became a player');
+ await rtl.waitFor(() => assert.equal(reports, 1, 'the thread is told once that the placeholder became a player'));
});
test('previews mounted together start their fetches apart, so a burst stays under the gateway throttle', async () => {