/**
 * Playwright config for browser QA against the *real* running stack
 * (alqove-api on :8000, next dev on :3000, mailpit on :8025).
 *
 * Unlike the default playwright.config.ts (which spins up a mock API + a
 * fresh next dev server in test mode), this config does NOT manage any
 * services — they must already be running.
 */

import { defineConfig, devices } from '@playwright/test';

const WEB = process.env.QA_WEB ?? 'http://localhost:3000';

export default defineConfig({
  testDir: './e2e',
  testMatch: /qa-returns.*\.spec\.ts$/,
  timeout: 30_000,
  fullyParallel: false,
  workers: 1,
  reporter: [['list']],
  use: {
    baseURL: WEB,
    trace: 'retain-on-failure',
  },
  projects: [
    {
      name: 'chromium',
      use: { ...devices['Desktop Chrome'] },
    },
  ],
});
