import { defineConfig } from "@playwright/test";

// Boots the real simulator (uvicorn) from the repo root so it serves the actual
// sample_media manifest + morphs. Requires the project venv on PATH (or activated)
// — see README.md.
export default defineConfig({
  testDir: "./tests",
  timeout: 60_000,
  webServer: {
    command: "cd ../.. && python -m uvicorn simulator.app:app --port 8099",
    url: "http://localhost:8099/api/clips",
    reuseExistingServer: !process.env.CI,
    timeout: 60_000,
  },
  use: {
    baseURL: "http://localhost:8099",
    actionTimeout: 10_000,
  },
});
