From c64708cc37efc09f07a382de0063dd866e12e129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 10 Sep 2026 06:49:14 +0200 Subject: [PATCH] test(ci): pin the third end-to-end server the notification journey drives The determinism guard counted two Playwright servers and would have refused a third by deletion; the notification journey's mail-configured, scheduler-free process is the third. Pin it by its two distinguishing variables and assert the shared servers carry no mail configuration. --- scripts/__tests__/ci-determinism.test.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/__tests__/ci-determinism.test.ts b/scripts/__tests__/ci-determinism.test.ts index 5d6714b18..c9708f90a 100644 --- a/scripts/__tests__/ci-determinism.test.ts +++ b/scripts/__tests__/ci-determinism.test.ts @@ -45,16 +45,19 @@ describe("Playwright CI determinism", () => { expect(config.retries).toBe(2); expect(config.failOnFlakyTests).toBe(true); expect(config.reporter).toEqual([["github"], ["html", { open: "never" }]]); - // Two servers, and which is which matters. The suite's own server runs + // Three servers, and which is which matters. The suite's own server runs // with the dashboard's RSC prefetch OFF so `page.route` fixtures govern // what the dashboard paints; the second runs it ON, which is the default // and therefore the only configuration self-hosters ever see. A React #418 // hydration bailout shipped on `/` precisely because nothing in CI ran the - // shipped one. Pin both so that gap cannot reopen by deletion. + // shipped one. The third is the mail-configured, scheduler-free process the + // notification journey drives, kept apart so the SMTP env never renders + // the Email card for every other spec. Pin all three so no gap can reopen + // by deletion. const servers = config.webServer; expect(Array.isArray(servers)).toBe(true); const webServers = servers as Array>; - expect(webServers).toHaveLength(2); + expect(webServers).toHaveLength(3); for (const server of webServers) { expect(server).toMatchObject({ command: expect.stringContaining( @@ -71,6 +74,12 @@ describe("Playwright CI determinism", () => { expect(webServers[1]!.env).toMatchObject({ DASHBOARD_SSR_PREFETCH: "true", }); + expect(webServers[2]!.env).toMatchObject({ + HEALTHLOG_PROCESS_TYPE: "web", + SMTP_HOST: expect.any(String), + }); + expect(webServers[0]!.env).not.toHaveProperty("SMTP_HOST"); + expect(webServers[1]!.env).not.toHaveProperty("SMTP_HOST"); }); it("retains the Playwright report after every workflow outcome", () => {