From 1e517905c7ef91635b4a1db235c6b12757aa1536 Mon Sep 17 00:00:00 2001 From: James Kraus Date: Tue, 13 Oct 2026 15:30:48 -0400 Subject: [PATCH 1/2] test(inbox): open Inbox directly in the edit journeys The edit journeys landed on the default #Alpha view and reached Inbox through the search palette. #Alpha shows the broadcast reply, and its 300 ms reading dwell marks that reply read. On a slow runner the palette hop takes several seconds, so the reply left Inbox before the test looked for it. This happened in CI run 38451842483 (webkit 2/9), where nine shards make this file the first one on a cold worker. Open the Inbox page target directly so no channel view can read the reply first. Assertions are unchanged. Holding #Alpha for 5 s before the old navigation reproduces the failure locally; the same hold on the direct Inbox route passes. Co-Authored-By: Claude Opus 5.5 Signed-off-by: James Kraus Signed-off-by: Logan Johnson --- tests/browser/inbox-edit.spec.mjs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/browser/inbox-edit.spec.mjs b/tests/browser/inbox-edit.spec.mjs index bc6c000ff..0014a52bf 100644 --- a/tests/browser/inbox-edit.spec.mjs +++ b/tests/browser/inbox-edit.spec.mjs @@ -1,5 +1,4 @@ import { test, expect } from "./fixture.mjs"; -import { openPage } from "./navigation.mjs"; // Browser boundary: Inbox plugin routing and portalled message-menu dismissal // must focus the same native decorated editor and preserve its reply draft. @@ -12,12 +11,24 @@ test.use({ viewport: { width: 1280, height: 720 }, }); +// Start in Inbox. The default #Alpha view shows the broadcast reply, and its +// 300 ms reading dwell can read that reply out of Inbox before a slow runner +// finishes navigating there. +const inboxAddress = (origin) => + `${origin}/#buzz=${encodeURIComponent( + JSON.stringify({ + version: 1, + kind: "page", + pluginId: "buzz.inbox", + pageId: "inbox", + }), + )}`; + test("Inbox edits an owned reply in place and restores the reply draft", async ({ page, app, }, testInfo) => { - await page.goto(app.origin); - await openPage(page, "Inbox"); + await page.goto(inboxAddress(app.origin)); const inbox = page.getByRole("region", { name: "Inbox", exact: true }); await expect(inbox.getByText("Checking recent activity…")).toHaveCount(0); const conversation = inbox @@ -121,8 +132,7 @@ for (const submitted of [false, true]) page, app, }) => { - await page.goto(app.origin); - await openPage(page, "Inbox"); + await page.goto(inboxAddress(app.origin)); const inbox = page.getByRole("region", { name: "Inbox", exact: true }); await expect(inbox.getByText("Checking recent activity…")).toHaveCount(0); // The preview can settle on either reply as thread inputs arrive; the From 2ef18b5d12557060fa6507743c177c4b8f879c75 Mon Sep 17 00:00:00 2001 From: James Kraus Date: Tue, 13 Oct 2026 20:32:25 -0400 Subject: [PATCH 2/2] test(inbox): open the edit journey's conversation by name The edit journey finds its Inbox row by the preview text "Broadcast reply". That row is one conversation with two replies, and its preview can show either one: thread inputs arrive in either order, and #Alpha's 300 ms reading dwell marks the broadcast reply read while the test navigates there. Either way the filter matches nothing. Click the conversation by its accessible name, as #1002 does for the withholding journeys in this file. This replaces the direct Inbox route. Co-Authored-By: Claude Opus 5.5 Signed-off-by: James Kraus Signed-off-by: Logan Johnson --- tests/browser/inbox-edit.spec.mjs | 33 ++++++++++++------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/tests/browser/inbox-edit.spec.mjs b/tests/browser/inbox-edit.spec.mjs index 0014a52bf..fce5ecaa9 100644 --- a/tests/browser/inbox-edit.spec.mjs +++ b/tests/browser/inbox-edit.spec.mjs @@ -1,4 +1,5 @@ import { test, expect } from "./fixture.mjs"; +import { openPage } from "./navigation.mjs"; // Browser boundary: Inbox plugin routing and portalled message-menu dismissal // must focus the same native decorated editor and preserve its reply draft. @@ -11,31 +12,22 @@ test.use({ viewport: { width: 1280, height: 720 }, }); -// Start in Inbox. The default #Alpha view shows the broadcast reply, and its -// 300 ms reading dwell can read that reply out of Inbox before a slow runner -// finishes navigating there. -const inboxAddress = (origin) => - `${origin}/#buzz=${encodeURIComponent( - JSON.stringify({ - version: 1, - kind: "page", - pluginId: "buzz.inbox", - pageId: "inbox", - }), - )}`; - test("Inbox edits an owned reply in place and restores the reply draft", async ({ page, app, }, testInfo) => { - await page.goto(inboxAddress(app.origin)); + await page.goto(app.origin); + await openPage(page, "Inbox"); const inbox = page.getByRole("region", { name: "Inbox", exact: true }); await expect(inbox.getByText("Checking recent activity…")).toHaveCount(0); - const conversation = inbox - .getByRole("list", { name: "Inbox conversations" }) - .getByRole("listitem") - .filter({ hasText: "Broadcast reply" }); - await conversation.getByRole("button", { name: /^Open / }).click(); + // The preview can settle on either reply as thread inputs arrive; the + // conversation's accessible identity is the stable target for this test. + await inbox + .getByRole("button", { + name: "Open Alice Fixture in #Alpha", + exact: true, + }) + .click(); const detail = inbox.getByRole("region", { name: "Inbox detail" }); const reply = detail.getByRole("textbox", { name: "Reply to thread", @@ -132,7 +124,8 @@ for (const submitted of [false, true]) page, app, }) => { - await page.goto(inboxAddress(app.origin)); + await page.goto(app.origin); + await openPage(page, "Inbox"); const inbox = page.getByRole("region", { name: "Inbox", exact: true }); await expect(inbox.getByText("Checking recent activity…")).toHaveCount(0); // The preview can settle on either reply as thread inputs arrive; the