file-open.spec.ts 600 B

123456789101112131415161718
  1. import { test, expect } from "../fixtures"
  2. import { openPalette, clickListItem } from "../actions"
  3. test("can open a file tab from the search palette", async ({ page, gotoSession }) => {
  4. await gotoSession()
  5. const dialog = await openPalette(page)
  6. const input = dialog.getByRole("textbox").first()
  7. await input.fill("package.json")
  8. await clickListItem(dialog, { keyStartsWith: "file:" })
  9. await expect(dialog).toHaveCount(0)
  10. const tabs = page.locator('[data-component="tabs"][data-variant="normal"]')
  11. await expect(tabs.locator('[data-slot="tabs-trigger"]').first()).toBeVisible()
  12. })