diff --git a/tests/browser/buzz-links.spec.mjs b/tests/browser/buzz-links.spec.mjs index d14e9301cb..f2a40976b8 100644 --- a/tests/browser/buzz-links.spec.mjs +++ b/tests/browser/buzz-links.spec.mjs @@ -225,11 +225,14 @@ test("a message link's context menu opens its thread as a tab without leaving th await expect(link).toBeVisible(); await virtuaIdle(page); const before = (await state(page)).entry; - // Target the link itself instead of a cached coordinate: under load WebKit can - // spend the first pointer move opening the preview and toolbar, shifting the - // actionable point before the contextmenu event. The test is about the link's - // composed context-menu owner, not stale coordinate hit-testing. - await link.click({ button: "right" }); + // A right-click that meets Virtua's 150ms pointer-event hold is intercepted by + // the scroller; Playwright's retry scrolls the list, restarting the hold, and + // the contextmenu event can then reach the scroller instead of the link. This + // test is about the link's composed context-menu owner, not hit testing: open + // it by keyboard, which no scroll can intercept. + await link.focus(); + await expect(link).toBeFocused(); + await link.press("Shift+F10"); const menu = page.getByRole("menu"); await expect(menu.getByRole("menuitem")).toHaveText([ "Open link",