From d162a92c3fd1603e0c5ee94ddb341ad0880e91aa Mon Sep 17 00:00:00 2001 From: Dotta Date: Mon, 26 Oct 2026 20:27:18 -0500 Subject: [PATCH] test(evals): capture the actual authenticated disabled chat page --- .../chat-catalog-domains/runtime-chat-disabled.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/runner-e2e/chat-catalog-domains/runtime-chat-disabled.ts b/tests/runner-e2e/chat-catalog-domains/runtime-chat-disabled.ts index d5fa721162c..ac287d8a6ba 100644 --- a/tests/runner-e2e/chat-catalog-domains/runtime-chat-disabled.ts +++ b/tests/runner-e2e/chat-catalog-domains/runtime-chat-disabled.ts @@ -45,7 +45,11 @@ export const runtimeDisabledChatCases: readonly IdentityBoundaryCase[] = [{ const settings = await api.get<{ enableAgentChat: boolean }>("/api/instance/settings/experimental"); const root = `/api/companies/${fixtures.company.id}`; const beforeTaskIds = (await api.get>(`${root}/issues?includeAgentCreatedTasks=true&limit=1000`)).map(row => row.id).sort(); - const page = await person.context.newPage(); + // The boundary capture callback is bound to ctx.page. Authenticate that + // actual page with the same genuine human session rather than inspecting + // a second page while retaining an unrelated screenshot. + await ctx.page.context().addCookies(await person.context.cookies()); + const page = ctx.page; await page.goto(`/${fixtures.company.issuePrefix}/chats/${fixtures.agent.id}`, { waitUntil: "domcontentloaded" }); await expect(page.getByText(/Agent Chat is disabled\. Enable it in Experimental settings/)).toBeVisible(); await expect(page.getByTestId("task-chat-composer-input")).toHaveCount(0);