diff options
| author | Dax Raad <[email protected]> | 2026-03-11 23:24:38 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2026-03-11 23:24:38 -0400 |
| commit | b1ef501207aa9d2c7f7ee70cbd1d9fde360be219 (patch) | |
| tree | 67a74164219fd8adff77fdd549934424333e5bd2 /packages/app | |
| parent | 9fb12a906eb8b1ef5f346623d11bd86689f926b1 (diff) | |
| parent | fafbc29316e7240b348db9e91e7a8e97cd803aef (diff) | |
| download | opencode-b1ef501207aa9d2c7f7ee70cbd1d9fde360be219.tar.gz opencode-b1ef501207aa9d2c7f7ee70cbd1d9fde360be219.zip | |
Merge remote-tracking branch 'origin/dev' into dev
Diffstat (limited to 'packages/app')
| -rw-r--r-- | packages/app/e2e/prompt/prompt-slash-terminal.spec.ts | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/packages/app/e2e/prompt/prompt-slash-terminal.spec.ts b/packages/app/e2e/prompt/prompt-slash-terminal.spec.ts index bf9f96b47..fa884b752 100644 --- a/packages/app/e2e/prompt/prompt-slash-terminal.spec.ts +++ b/packages/app/e2e/prompt/prompt-slash-terminal.spec.ts @@ -6,16 +6,29 @@ test("/terminal toggles the terminal panel", async ({ page, gotoSession }) => { const prompt = page.locator(promptSelector) const terminal = page.locator(terminalSelector) + const slash = page.locator('[data-slash-id="terminal.toggle"]').first() await expect(terminal).not.toBeVisible() await prompt.fill("/terminal") - await expect(page.locator('[data-slash-id="terminal.toggle"]').first()).toBeVisible() + await expect(slash).toBeVisible() await page.keyboard.press("Enter") await expect(terminal).toBeVisible() - await prompt.fill("/terminal") - await expect(page.locator('[data-slash-id="terminal.toggle"]').first()).toBeVisible() + // Terminal panel retries focus (immediate, RAF, 120ms, 240ms) after opening, + // which can steal focus from the prompt and prevent fill() from triggering + // the slash popover. Re-attempt click+fill until all retries are exhausted + // and the popover appears. + await expect + .poll( + async () => { + await prompt.click().catch(() => false) + await prompt.fill("/terminal").catch(() => false) + return slash.isVisible().catch(() => false) + }, + { timeout: 10_000 }, + ) + .toBe(true) await page.keyboard.press("Enter") await expect(terminal).not.toBeVisible() }) |
