test(app): slash command smoke tests

This commit is contained in:
Adam
2026-01-22 06:27:08 -06:00
parent 6f7d710129
commit ec53a7962e
2 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
import { test, expect } from "./fixtures"
import { promptSelector } from "./utils"
test("smoke /open opens file picker dialog", async ({ page, gotoSession }) => {
await gotoSession()
await page.locator(promptSelector).click()
await page.keyboard.type("/open")
const command = page.locator('[data-slash-id="file.open"]')
await expect(command).toBeVisible()
await command.hover()
await page.keyboard.press("Enter")
const dialog = page.getByRole("dialog")
await expect(dialog).toBeVisible()
await expect(dialog.getByRole("textbox").first()).toBeVisible()
await page.keyboard.press("Escape")
await expect(dialog).toHaveCount(0)
})

View File

@@ -22,7 +22,7 @@ Add 6 smoke tests to `packages/app/e2e/`:
### Progress
- [x] 1. Settings dialog open / switch / close (`packages/app/e2e/settings.spec.ts`)
- [ ] 2. Prompt slash command path: `/open` opens file picker
- [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
- [ ] 4. Model selection UI works end-to-end
- [ ] 5. File viewer renders real file content