test(app): @ attachment smoke test

This commit is contained in:
Adam
2026-01-22 06:30:16 -06:00
parent ec53a7962e
commit 710dc4fa94
2 changed files with 22 additions and 1 deletions

View 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")
})

View File

@@ -23,7 +23,7 @@ Add 6 smoke tests to `packages/app/e2e/`:
- [x] 1. Settings dialog open / switch / close (`packages/app/e2e/settings.spec.ts`)
- [x] 2. Prompt slash command path: `/open` opens file picker (`packages/app/e2e/prompt-slash-open.spec.ts`)
- [ ] 3. Prompt @mention inserts a file pill token
- [x] 3. Prompt @mention inserts a file pill token (`packages/app/e2e/prompt-mention.spec.ts`)
- [ ] 4. Model selection UI works end-to-end
- [ ] 5. File viewer renders real file content
- [ ] 8. Terminal init + create new terminal