terminal.spec.ts 542 B

1234567891011121314151617
  1. import { test, expect } from "../fixtures"
  2. import { terminalSelector } from "../selectors"
  3. import { terminalToggleKey } from "../utils"
  4. test("terminal panel can be toggled", async ({ page, gotoSession }) => {
  5. await gotoSession()
  6. const terminal = page.locator(terminalSelector)
  7. const initiallyOpen = await terminal.isVisible()
  8. if (initiallyOpen) {
  9. await page.keyboard.press(terminalToggleKey)
  10. await expect(terminal).toHaveCount(0)
  11. }
  12. await page.keyboard.press(terminalToggleKey)
  13. await expect(terminal).toBeVisible()
  14. })