test(app): terminal smoke test
This commit is contained in:
25
packages/app/e2e/terminal-init.spec.ts
Normal file
25
packages/app/e2e/terminal-init.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import { test, expect } from "./fixtures"
|
||||||
|
import { promptSelector, terminalSelector, terminalToggleKey } from "./utils"
|
||||||
|
|
||||||
|
test("smoke terminal mounts and can create a second tab", async ({ page, gotoSession }) => {
|
||||||
|
await gotoSession()
|
||||||
|
|
||||||
|
const terminals = page.locator(terminalSelector)
|
||||||
|
const opened = await terminals.first().isVisible()
|
||||||
|
|
||||||
|
if (!opened) {
|
||||||
|
await page.keyboard.press(terminalToggleKey)
|
||||||
|
}
|
||||||
|
|
||||||
|
await expect(terminals.first()).toBeVisible()
|
||||||
|
await expect(terminals.first().locator("textarea")).toHaveCount(1)
|
||||||
|
await expect(terminals).toHaveCount(1)
|
||||||
|
|
||||||
|
// Ghostty captures a lot of keybinds when focused; move focus back
|
||||||
|
// to the app shell before triggering `terminal.new`.
|
||||||
|
await page.locator(promptSelector).click()
|
||||||
|
await page.keyboard.press("Control+Alt+T")
|
||||||
|
|
||||||
|
await expect(terminals).toHaveCount(2)
|
||||||
|
await expect(terminals.nth(1).locator("textarea")).toHaveCount(1)
|
||||||
|
})
|
||||||
@@ -26,7 +26,7 @@ Add 6 smoke tests to `packages/app/e2e/`:
|
|||||||
- [x] 3. Prompt @mention inserts a file pill token (`packages/app/e2e/prompt-mention.spec.ts`)
|
- [x] 3. Prompt @mention inserts a file pill token (`packages/app/e2e/prompt-mention.spec.ts`)
|
||||||
- [x] 4. Model selection UI works end-to-end (`packages/app/e2e/model-picker.spec.ts`)
|
- [x] 4. Model selection UI works end-to-end (`packages/app/e2e/model-picker.spec.ts`)
|
||||||
- [x] 5. File viewer renders real file content (`packages/app/e2e/file-viewer.spec.ts`)
|
- [x] 5. File viewer renders real file content (`packages/app/e2e/file-viewer.spec.ts`)
|
||||||
- [ ] 8. Terminal init + create new terminal
|
- [x] 8. Terminal init + create new terminal (`packages/app/e2e/terminal-init.spec.ts`)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user