From 95e9407e6313b42c3a7fc480f283ec151c386355 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Tue, 20 Jan 2026 13:53:55 -0600 Subject: test(app): fix e2e --- packages/app/e2e/prompt.spec.ts | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'packages/app/e2e') diff --git a/packages/app/e2e/prompt.spec.ts b/packages/app/e2e/prompt.spec.ts index 26cab5a38..3e5892ce8 100644 --- a/packages/app/e2e/prompt.spec.ts +++ b/packages/app/e2e/prompt.spec.ts @@ -37,24 +37,19 @@ test("can send a prompt and receive a reply", async ({ page, sdk, gotoSession }) .poll( async () => { const messages = await sdk.session.messages({ sessionID, limit: 50 }).then((r) => r.data ?? []) - const assistant = messages - .slice() - .reverse() - .find((m) => m.info.role === "assistant") - - return ( - assistant?.parts - .filter((p) => p.type === "text") - .map((p) => p.text) - .join("\n") ?? "" - ) + return messages + .filter((m) => m.info.role === "assistant") + .flatMap((m) => m.parts) + .filter((p) => p.type === "text") + .map((p) => p.text) + .join("\n") }, { timeout: 90_000 }, ) .toContain(token) - const reply = page.locator('[data-component="text-part"]').filter({ hasText: token }).first() + const reply = page.locator('[data-slot="session-turn-summary-section"]').filter({ hasText: token }).first() await expect(reply).toBeVisible({ timeout: 90_000 }) } finally { page.off("pageerror", onPageError) -- cgit v1.2.3