Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

test(journey): the design_book request in the MCP test takes the journey beside the parsed directives

Maurice4cc62f4c4eb6
diff --git a/server/tests/unit/nest/journey/journey-book-design.mcp.test.ts b/server/tests/unit/nest/journey/journey-book-design.mcp.test.ts
index 06f30f852..4a07521ab 100644
--- a/server/tests/unit/nest/journey/journey-book-design.mcp.test.ts
+++ b/server/tests/unit/nest/journey/journey-book-design.mcp.test.ts
@@ -240,11 +240,8 @@ describe('the design tools', () => {
it('JBDMCP-006: design_book takes layouts templates and answers the template of each page', async () => {
const { journey, editor } = await crew();
- const request = designBookRequestSchema.parse({
- journeyId: journey.id,
- directives: { style: 'postcard', layouts: 'templates', seed: 1 },
- });
- const designed = await designs.designBook(request, ctx(editor.id));
+ const request = designBookRequestSchema.parse({ directives: { style: 'postcard', layouts: 'templates', seed: 1 } });
+ const designed = await designs.designBook({ journeyId: journey.id, ...request }, ctx(editor.id));
const draft = bookDesignAnswerSchema.parse(answered(designed));
expect(draft.plan.some((row) => row.template !== undefined)).toBe(true);
expect(draft.style.style).toBe('postcard');