mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-03 11:16:46 +00:00
test(app): block real llm calls in e2e prompts (#20579)
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
waitSession,
|
||||
waitSessionSaved,
|
||||
waitSlug,
|
||||
withNoReplyPrompt,
|
||||
} from "../actions"
|
||||
import { projectSwitchSelector, promptSelector, workspaceItemSelector, workspaceNewSessionSelector } from "../selectors"
|
||||
import { dirSlug, resolveDirectory } from "../utils"
|
||||
@@ -81,8 +82,10 @@ test("switching back to a project opens the latest workspace session", async ({
|
||||
// Create a session by sending a prompt
|
||||
const prompt = page.locator(promptSelector)
|
||||
await expect(prompt).toBeVisible()
|
||||
await prompt.fill("test")
|
||||
await page.keyboard.press("Enter")
|
||||
await withNoReplyPrompt(page, async () => {
|
||||
await prompt.fill("test")
|
||||
await page.keyboard.press("Enter")
|
||||
})
|
||||
|
||||
// Wait for the URL to update with the new session ID
|
||||
await expect.poll(() => sessionIDFromUrl(page.url()) ?? "", { timeout: 15_000 }).not.toBe("")
|
||||
|
||||
Reference in New Issue
Block a user