diff options
| author | Adam <[email protected]> | 2026-01-22 06:27:08 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-01-22 07:34:44 -0600 |
| commit | ec53a7962e40a3beb8027d19a73a512776d833f7 (patch) | |
| tree | 36180657e7fe4adc8c7edbc93ef612fe2ac27473 /packages | |
| parent | 6f7d710129bfd2859dbdf0716003d486a4afeda8 (diff) | |
| download | opencode-ec53a7962e40a3beb8027d19a73a512776d833f7.tar.gz opencode-ec53a7962e40a3beb8027d19a73a512776d833f7.zip | |
test(app): slash command smoke tests
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/app/e2e/prompt-slash-open.spec.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/app/e2e/prompt-slash-open.spec.ts b/packages/app/e2e/prompt-slash-open.spec.ts new file mode 100644 index 000000000..3c29d405c --- /dev/null +++ b/packages/app/e2e/prompt-slash-open.spec.ts @@ -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) +}) |
