terminal.spec.ts 510 B

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