diff options
| author | Adam <[email protected]> | 2026-01-22 07:33:17 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-01-22 07:34:44 -0600 |
| commit | 287511c9b1320a2a8a464531c2a5f4e02cd259bf (patch) | |
| tree | d21bdb43b84806d5e406d9c6a62bb3dabd3a17bf /packages/app/e2e | |
| parent | 0a678eeaccd91470166b6d64c1d4a2c5f615454c (diff) | |
| download | opencode-287511c9b1320a2a8a464531c2a5f4e02cd259bf.tar.gz opencode-287511c9b1320a2a8a464531c2a5f4e02cd259bf.zip | |
test(app): terminal smoke test
Diffstat (limited to 'packages/app/e2e')
| -rw-r--r-- | packages/app/e2e/terminal-init.spec.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/packages/app/e2e/terminal-init.spec.ts b/packages/app/e2e/terminal-init.spec.ts new file mode 100644 index 000000000..cfde2d019 --- /dev/null +++ b/packages/app/e2e/terminal-init.spec.ts @@ -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) +}) |
