input-focus.spec.ts 454 B

123456789101112131415
  1. import { test, expect } from "../fixtures"
  2. import { promptSelector } from "../selectors"
  3. test("ctrl+l focuses the prompt", async ({ page, gotoSession }) => {
  4. await gotoSession()
  5. const prompt = page.locator(promptSelector)
  6. await expect(prompt).toBeVisible()
  7. await page.locator("main").click({ position: { x: 5, y: 5 } })
  8. await expect(prompt).not.toBeFocused()
  9. await page.keyboard.press("Control+L")
  10. await expect(prompt).toBeFocused()
  11. })