test(app): deflake slash terminal toggle flow (#17881)

This commit is contained in:
Luke Parker 2026-03-17 12:55:58 +10:00 committed by GitHub
commit e416e59ea6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 186 additions and 26 deletions

View file

@ -1,5 +1,5 @@
import { test, expect } from "../fixtures"
import { waitTerminalReady } from "../actions"
import { waitTerminalFocusIdle, waitTerminalReady } from "../actions"
import { promptSelector, terminalSelector } from "../selectors"
import { terminalToggleKey } from "../utils"
@ -14,7 +14,7 @@ test("smoke terminal mounts and can create a second tab", async ({ page, gotoSes
await page.keyboard.press(terminalToggleKey)
}
await waitTerminalReady(page, { term: terminals.first() })
await waitTerminalFocusIdle(page, { term: terminals.first() })
await expect(terminals).toHaveCount(1)
// Ghostty captures a lot of keybinds when focused; move focus back