From 280e55bbc947b05b615ad89fd42fa576097f66d0 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 24 Oct 2026 17:15:48 +0200 Subject: [PATCH] test(vacay): a day in a year the plan has not opened also announces the new year The broadcast parity cases toggle a day in 2027, which the seeded plan does not hold, so both MCP and REST now send vacay:settings for the opened year before vacay:update. --- .../tests/integration/broadcast-parity/user.cases.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server/tests/integration/broadcast-parity/user.cases.ts b/server/tests/integration/broadcast-parity/user.cases.ts index 2acbed889..88ee0a10c 100644 --- a/server/tests/integration/broadcast-parity/user.cases.ts +++ b/server/tests/integration/broadcast-parity/user.cases.ts @@ -602,14 +602,22 @@ const vacayCases: ParityCase[] = [ needs: ['vacay'], args: () => ({ date: '2027-06-01' }), rest: { method: 'post', path: () => `${VACAY}/entries/toggle`, body: () => ({ date: '2027-06-01' }) }, - expect: [{ event: 'vacay:update', user: 'actor' }], + // 2027 is not a year of the plan yet, so the day opens it too. + expect: [ + { event: 'vacay:settings', user: 'actor' }, + { event: 'vacay:update', user: 'actor' }, + ], }, { tool: 'toggle_company_holiday', needs: ['vacay'], args: () => ({ date: '2027-06-02' }), rest: { method: 'post', path: () => `${VACAY}/entries/company-holiday`, body: () => ({ date: '2027-06-02' }) }, - expect: [{ event: 'vacay:update', user: 'actor' }], + // 2027 is not a year of the plan yet, so the day opens it too. + expect: [ + { event: 'vacay:settings', user: 'actor' }, + { event: 'vacay:update', user: 'actor' }, + ], }, { tool: 'update_vacay_stats',