From 4a34c17d75020be137a3ba63faa25e4655277eb2 Mon Sep 17 00:00:00 2001 From: Dotta Date: Sun, 8 Nov 2026 22:06:44 -0600 Subject: [PATCH] test(evals): reset Morgan's sessions from the profile header actions menu The agent profile h1 is the agent's title, not its name, and the menu item now reads "Reset sessions". Identity is already confirmed by the named avatar in openRuntimeAgentProfile; use the main landmark and a case-insensitive reset label. Co-Authored-By: Claude Opus 5.5 --- tests/runner-e2e/chat-catalog-domains/runtime-session.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/runner-e2e/chat-catalog-domains/runtime-session.ts b/tests/runner-e2e/chat-catalog-domains/runtime-session.ts index adaf2a55026..726a994fb6d 100644 --- a/tests/runner-e2e/chat-catalog-domains/runtime-session.ts +++ b/tests/runner-e2e/chat-catalog-domains/runtime-session.ts @@ -53,11 +53,12 @@ export const runtimeSessionCases = [runtimeDefinition("runs-adapters.reset-sessi state.agentResetStatus = await probeAgentPermission(ctx, `/api/agents/${worker.id}/runtime-state/reset-session`, "POST", {}); state.sessionPresentBeforeHuman = (await ctx.input.api.get(`/api/agents/${worker.id}/task-sessions`)).length > 0; const source = ctx.input.page.url(); await openRuntimeAgentProfile(ctx, worker, query); - const profile = ctx.input.page.locator("#main-content"); - await expect(profile.getByRole("heading", { name: worker.name!, exact: true })).toBeVisible(); + // The profile header's h1 is Morgan's title; openRuntimeAgentProfile already confirmed whose + // profile this is by its named avatar. The reset control lives in the header's actions menu. + const profile = ctx.input.page.getByRole("main"); await profile.getByRole("button", { name: `Open actions for ${worker.name}`, exact: true }).click(); chatCatalogNativePhaseRemainingBudget(ctx)?.(); - await ctx.input.page.getByRole("button", { name: "Reset Sessions", exact: true }).click(); + await ctx.input.page.getByRole("button", { name: /^Reset sessions$/i }).click(); await pollUntil({ label: "Human reset clears the real task session", deadlineAt: Date.now() + 30_000, load: () => ctx.input.api.get(`/api/agents/${worker.id}/task-sessions`), accept: rows => rows.length === 0 }); state.humanReset = true; state.sessionsEmptyAfterHuman = true;