From e8eed3e6414d03b347b00fd9f7854ef89994915e Mon Sep 17 00:00:00 2001 From: NuklearRabbit <145918611+NuklearRabbit@users.noreply.github.com> Date: Sat, 29 Aug 2026 00:40:51 +0200 Subject: [PATCH] fix(ci): package contract fixtures and recover deploy chunk races --- .dockerignore | 4 +++- backend/Dockerfile | 1 + frontend/e2e-live/smoke.spec.ts | 9 +++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 8487d98..25602f6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -14,7 +14,9 @@ artifacts docs deploy -n8n +n8n/** +!n8n/workflows/ +!n8n/workflows/** frontend *.tgz *.tar.gz diff --git a/backend/Dockerfile b/backend/Dockerfile index 1a48703..293ea96 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -26,6 +26,7 @@ RUN pip install --no-cache-dir -r requirements.lock COPY backend/tests ./tests COPY contracts ./contracts COPY scripts/check-contracts.py ./scripts/check-contracts.py +COPY n8n/workflows ./n8n/workflows USER app FROM runtime-base AS runtime diff --git a/frontend/e2e-live/smoke.spec.ts b/frontend/e2e-live/smoke.spec.ts index ecc28b5..778174b 100644 --- a/frontend/e2e-live/smoke.spec.ts +++ b/frontend/e2e-live/smoke.spec.ts @@ -26,6 +26,15 @@ test("non-destructive operator canary covers routes and grounded knowledge", asy await page.goto("/login"); await page.getByRole("button", { name: "Verken als Operationsmanager" }).click(); await expect(page).toHaveURL(/\/dashboard$/); + if (pageErrors.some((message) => message.toLowerCase().includes("dynamically imported module"))) { + // A deploy can replace the SPA between loading index.html and its lazy + // dashboard chunk. One clean reload must recover; a persistent chunk or + // server error is collected again and still fails the canary below. + pageErrors.length = 0; + await page.reload({ waitUntil: "domcontentloaded" }); + await expect(page).toHaveURL(/\/dashboard$/); + await expect(page.locator("main")).toBeVisible(); + } for (const [path, heading] of [ ["/vehicles", "Wagenpark"],