mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-06 08:21:50 +00:00
test(app): @ attachment smoke test
This commit is contained in:
parent
ec53a7962e
commit
710dc4fa94
2 changed files with 22 additions and 1 deletions
21
packages/app/e2e/prompt-mention.spec.ts
Normal file
21
packages/app/e2e/prompt-mention.spec.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { test, expect } from "./fixtures"
|
||||
import { promptSelector } from "./utils"
|
||||
|
||||
test("smoke @mention inserts file pill token", async ({ page, gotoSession }) => {
|
||||
await gotoSession()
|
||||
|
||||
await page.locator(promptSelector).click()
|
||||
await page.keyboard.type("@packages/app/package.json")
|
||||
|
||||
const suggestion = page.getByRole("button", { name: /packages\/app\/\s*package\.json/ }).first()
|
||||
await expect(suggestion).toBeVisible()
|
||||
await suggestion.hover()
|
||||
|
||||
await page.keyboard.press("Tab")
|
||||
|
||||
const pill = page.locator(`${promptSelector} [data-type="file"][data-path="packages/app/package.json"]`)
|
||||
await expect(pill).toBeVisible()
|
||||
|
||||
await page.keyboard.type(" ok")
|
||||
await expect(page.locator(promptSelector)).toContainText("ok")
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue