diff --git a/frontend/tests/chat-session-write.test.ts b/frontend/tests/chat-session-write.test.ts index 2ac9af3a..86902d06 100644 --- a/frontend/tests/chat-session-write.test.ts +++ b/frontend/tests/chat-session-write.test.ts @@ -65,7 +65,7 @@ test("session API owns create and update while answer UI keeps sync failures out }); -test("homepage bootstrap reads profiles and sessions through same-origin APIs", () => { +test("self-hosted staging bootstrap reads profile and sessions through same-origin APIs", () => { const page = readFileSync(new URL("../src/app/page.tsx", import.meta.url), "utf8"); const accountRoute = readFileSync(new URL("../src/app/api/account/route.ts", import.meta.url), "utf8"); @@ -74,5 +74,7 @@ test("homepage bootstrap reads profiles and sessions through same-origin APIs", assert.match(page, /fetch\("\/api\/sessions"/); assert.match(page, /writeChatSession\(initialSession\.id,[\s\S]*?"create"\)/); assert.match(page, /fetch\(`\/api\/sessions\/\$\{encodeURIComponent\(sessionId\)\}`/); - assert.match(accountRoute, /rectificationCase,\s*profile,/); + assert.match(accountRoute, /AUTH_PROVIDER\?\.trim\(\) === "self-hosted"/); + assert.match(accountRoute, /profile,/); + assert.doesNotMatch(accountRoute, /rectificationCase/); });