summaryrefslogtreecommitdiffhomepage
path: root/packages/app/e2e
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-01-20 13:53:55 -0600
committerAdam <[email protected]>2026-01-20 14:02:09 -0600
commit95e9407e6313b42c3a7fc480f283ec151c386355 (patch)
tree2dbd25c35abacf077d46bfa7fa41200afb859dc8 /packages/app/e2e
parent1466b43c5c09f81607e616b24f567d472111afe7 (diff)
downloadopencode-95e9407e6313b42c3a7fc480f283ec151c386355.tar.gz
opencode-95e9407e6313b42c3a7fc480f283ec151c386355.zip
test(app): fix e2e
Diffstat (limited to 'packages/app/e2e')
-rw-r--r--packages/app/e2e/prompt.spec.ts19
1 files changed, 7 insertions, 12 deletions
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)