From 17c3b83c60e106902565d3abd879b7456ade9fa9 Mon Sep 17 00:00:00 2001 From: Logan Johnson Date: Wed, 9 Sep 2026 22:50:43 -0400 Subject: [PATCH] test(desktop): open buffered videos through latest-message action Signed-off-by: Logan Johnson --- desktop/tests/e2e/video-attachment.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/desktop/tests/e2e/video-attachment.spec.ts b/desktop/tests/e2e/video-attachment.spec.ts index 2c86f5a9bd..4960e7c0a6 100644 --- a/desktop/tests/e2e/video-attachment.spec.ts +++ b/desktop/tests/e2e/video-attachment.spec.ts @@ -1614,6 +1614,17 @@ test("playback speed persists across videos and reloads", async ({ page }) => { const player = page .locator(`[data-message-id="${emitted.id}"]`) .getByTestId("video-player"); + // Interacting with the previous player can leave the timeline reading an + // older row. Open buffered arrivals through the normal latest-message UI; + // subscription readiness alone does not make their rows visible. + await expect + .poll(async () => { + if (await player.isVisible()) return true; + const scrollToLatest = page.getByTestId("message-scroll-to-latest"); + if (await scrollToLatest.isVisible()) await scrollToLatest.click(); + return false; + }) + .toBe(true); await expect(player).toBeVisible(); await player.getByRole("button", { name: "Play video" }).click(); return player;