test(app): slash command smoke tests
This commit is contained in:
22
packages/app/e2e/prompt-slash-open.spec.ts
Normal file
22
packages/app/e2e/prompt-slash-open.spec.ts
Normal 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)
|
||||||
|
})
|
||||||
@@ -22,7 +22,7 @@ Add 6 smoke tests to `packages/app/e2e/`:
|
|||||||
### Progress
|
### Progress
|
||||||
|
|
||||||
- [x] 1. Settings dialog open / switch / close (`packages/app/e2e/settings.spec.ts`)
|
- [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
|
- [ ] 3. Prompt @mention inserts a file pill token
|
||||||
- [ ] 4. Model selection UI works end-to-end
|
- [ ] 4. Model selection UI works end-to-end
|
||||||
- [ ] 5. File viewer renders real file content
|
- [ ] 5. File viewer renders real file content
|
||||||
|
|||||||
Reference in New Issue
Block a user