test: look up the home main conversation in the scheduling journey

Since every project has its own main conversation, the journey that
schedules for a specialist found the user's main conversation with
findFirst over all of them. With the Lab project's conversation also
matching, it picked either one, so the check failed about one run in
three. The lookup now names the home space, where the specialist joined
and the routine is created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
This commit is contained in:
Claude 2026-10-03 23:45:43 +00:00
parent b68f7a7ff7
commit 1d9cba7e3c
No known key found for this signature in database

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