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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YTJRkJrXAS9e3aEFcFYTy8
This commit is contained in:
Claude 2026-10-04 01:45:58 +00:00
parent 818e483f47
commit a92065718b
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,10 @@ import { captureScreenshot } from "./helpers";
const fixture = "/e2e/fixtures/chart-links.html"; const fixture = "/e2e/fixtures/chart-links.html";
test("chart links cannot execute script when clicked or expanded", async ({ page }, testInfo) => { 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 inspect of ["0", "1"]) {
for (const href of [ for (const href of [
'javascript:void(document.body.dataset.plotExecuted="yes")', 'javascript:void(document.body.dataset.plotExecuted="yes")',

View File

@ -1301,8 +1301,9 @@ describeJourneys("required product journeys", () => {
}); });
await joinMainConversation(prisma, { userId: me.userId, botIds: [writer.id] }); 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({ const conversation = await prisma.chatGroup.findFirstOrThrow({
where: { userId: me.userId, kind: "main" }, where: { userId: me.userId, spaceId: main.spaceId, kind: "main" },
include: { thread: true }, include: { thread: true },
}); });
const inMain = await scheduleAndWake("Writer", "main-digest"); const inMain = await scheduleAndWake("Writer", "main-digest");