// @ts-check
const { defineConfig } = require('@playwright/test');

module.exports = defineConfig({
  testDir: './tests',
  timeout: 30_000,
  retries: 0,
  use: {
    baseURL: 'http://localhost:8391',
    headless: true,
    serviceWorkers: 'block',
  },
  webServer: {
    command: '../../bin/agent-dashboard-web --port 8391',
    url: 'http://localhost:8391',
    reuseExistingServer: !process.env.CI,
    timeout: 15_000,
  },
  projects: [
    {
      name: 'chromium',
      use: { browserName: 'chromium' },
    },
  ],
});
