From a92065718b3337fa424c69a60ba29c7e6b5d2f3f Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Oct 2026 01:45:58 +0000 Subject: [PATCH] test: port the main-conversation journey fix from #126 Journey 5c fails on main since every space got its own main conversation: the lookup picked the Lab conversation instead of the home one. Same change as #126 (including its chart-links warm-up), so this PR can go green; it no-ops once #126 lands. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01YTJRkJrXAS9e3aEFcFYTy8 --- apps/web/e2e/chart-links.spec.ts | 4 ++++ packages/testkit/src/journeys.test.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/web/e2e/chart-links.spec.ts b/apps/web/e2e/chart-links.spec.ts index c6e1133..81f6950 100644 --- a/apps/web/e2e/chart-links.spec.ts +++ b/apps/web/e2e/chart-links.spec.ts @@ -4,6 +4,10 @@ import { captureScreenshot } from "./helpers"; const fixture = "/e2e/fixtures/chart-links.html"; test("chart links cannot execute script when clicked or expanded", async ({ page }, testInfo) => { + test.setTimeout(120_000); + // ChartCanvas lazy-loads Observable Plot; pay the import cost once before the matrix below. + await page.goto(`${fixture}?${new URLSearchParams({ href: "#details", inspect: "0" })}`); + await expect(page.locator("svg circle").first()).toBeVisible({ timeout: 90_000 }); for (const inspect of ["0", "1"]) { for (const href of [ 'javascript:void(document.body.dataset.plotExecuted="yes")', diff --git a/packages/testkit/src/journeys.test.ts b/packages/testkit/src/journeys.test.ts index f5ae027..d6d8d98 100644 --- a/packages/testkit/src/journeys.test.ts +++ b/packages/testkit/src/journeys.test.ts @@ -1301,8 +1301,9 @@ describeJourneys("required product journeys", () => { }); await joinMainConversation(prisma, { userId: me.userId, botIds: [writer.id] }); + // Lab has a main conversation of its own; the home one is where Writer joined. const conversation = await prisma.chatGroup.findFirstOrThrow({ - where: { userId: me.userId, kind: "main" }, + where: { userId: me.userId, spaceId: main.spaceId, kind: "main" }, include: { thread: true }, }); const inMain = await scheduleAndWake("Writer", "main-digest");