test: fix journey 5c lookup and chart-links warmup (#126)

Look up the home main conversation by spaceId in journey 5c, and warm the chart-links E2E so the first Observable Plot import is not a 20s timeout.
This commit is contained in:
cynarAI 2026-10-04 04:00:43 +02:00 committed by GitHub
parent 2c6b5c3d7b
commit 4ba7d843b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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";
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")',

View File

@ -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");