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:
parent
59811952ec
commit
55bfe9d291
@ -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");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user