const { defineConfig } = require("@playwright/test");

module.exports = defineConfig({
  testDir: "./tests/e2e",
  outputDir: "./runtime/test-results",
  timeout: 30_000,
  fullyParallel: false,
  reporter: "line",
  use: {
    baseURL: "http://127.0.0.1:8876",
    channel: "msedge",
    headless: true,
    screenshot: "only-on-failure",
    trace: "retain-on-failure",
  },
  webServer: {
    command: "python -m http.server 8876 --bind 127.0.0.1 --directory frontend",
    url: "http://127.0.0.1:8876/index.html",
    reuseExistingServer: true,
    timeout: 15_000,
    stdout: "ignore",
    stderr: "ignore",
  },
});
