session.spec.ts 549 B

12345678910111213141516
  1. import { test, expect } from "../fixtures"
  2. import { promptSelector } from "../selectors"
  3. import { withSession } from "../actions"
  4. test("can open an existing session and type into the prompt", async ({ page, sdk, gotoSession }) => {
  5. const title = `e2e smoke ${Date.now()}`
  6. await withSession(sdk, title, async (session) => {
  7. await gotoSession(session.id)
  8. const prompt = page.locator(promptSelector)
  9. await prompt.click()
  10. await page.keyboard.type("hello from e2e")
  11. await expect(prompt).toContainText("hello from e2e")
  12. })
  13. })