Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions desktop/tests/e2e/video-attachment.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1513,12 +1513,14 @@ test("right-click menus expose distinct selectors for links, relay video, and of

// ── Relay video menu: Download video + Copy link, appearing only once the
// relay origin resolves (the reactivity fix) ─────────────────────────────
await emitVideoMessage(page, {
const relayMessage = (await emitVideoMessage(page, {
url: MENU_RELAY_VIDEO_URL,
sha: MENU_RELAY_VIDEO_SHA,
filename: "relay-clip.mp4",
});
const relayPlayer = page.getByTestId("video-player").last();
})) as { id: string };
const relayPlayer = page
.locator(`[data-message-id="${relayMessage.id}"]`)
.getByTestId("video-player");
await expect(relayPlayer).toBeVisible();
// Right-click the player surface. `force` skips the actionability guard: the
// Play-button overlay sits above the video, but the contextmenu event still
Expand Down Expand Up @@ -1559,12 +1561,14 @@ test("right-click menus expose distinct selectors for links, relay video, and of
await expect(page.locator("[data-video-context-menu]")).toHaveCount(0);

// ── Off-relay video control: renders and offers Copy link, never Download ─
await emitVideoMessage(page, {
const offRelayMessage = (await emitVideoMessage(page, {
url: MENU_OFF_RELAY_VIDEO_URL,
sha: MENU_OFF_RELAY_VIDEO_SHA,
filename: "external-clip.mp4",
});
const offRelayPlayer = page.getByTestId("video-player").last();
})) as { id: string };
const offRelayPlayer = page
.locator(`[data-message-id="${offRelayMessage.id}"]`)
.getByTestId("video-player");
await expect(offRelayPlayer).toBeVisible();
await offRelayPlayer.click({ button: "right", force: true });

Expand Down
Loading