From b34335daadc2152c5afcb8cdd1255a62808d81d6 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 26 Feb 2026 17:01:30 +0000 Subject: [PATCH] fix: e2e smoke test was nuking project_root on the live server The Playwright beforeEach hook called DELETE /api/project to get a clean selection screen. This request hit the live server via Vite's proxy and set project_root to None, breaking every background agent operation (server-owned completion, auto-assign, merge pipeline). Co-Authored-By: Claude Opus 4.6 --- frontend/tests/e2e/smoke.spec.ts | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/frontend/tests/e2e/smoke.spec.ts b/frontend/tests/e2e/smoke.spec.ts index 9c3669f..2aafd13 100644 --- a/frontend/tests/e2e/smoke.spec.ts +++ b/frontend/tests/e2e/smoke.spec.ts @@ -1,21 +1,16 @@ import { expect, test } from "@playwright/test"; test.describe("App boot smoke test", () => { - test.beforeEach(async ({ request }) => { - // Close any project the server may have auto-opened (e.g. via CLI path - // argument) so we always start from the selection screen. - await request.delete("/api/project").catch(() => { - // Ignore errors when no project is open or backend is unavailable. - }); - }); - - test("renders the project selection screen", async ({ page }) => { + test("renders the app without errors", async ({ page }) => { await page.goto("/"); - await expect(page.getByText("Story Kit")).toBeVisible(); - await expect(page.getByPlaceholder("/path/to/project")).toBeVisible(); - await expect( - page.getByRole("button", { name: "Open Project" }), - ).toBeVisible(); + // The app should render either the project selection screen or the + // workspace chat view, depending on whether a project is already open. + // We intentionally do NOT call DELETE /api/project here because that + // would nuke the live server's project_root state and break any + // background agents that depend on it. + // + // Just verify the page loads and has a visible
container. + await expect(page.locator("main.container")).toBeVisible(); }); });