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

// e2e runs against the production build in dist/, served by plain python
// http.server — which doubles as proof that dist serves statically.
// Portrait viewport: the game is a mobile-portrait metroidvania.
export default defineConfig({
  testDir: './tests',
  timeout: 90_000,
  fullyParallel: false,
  workers: 1,
  reporter: [['list']],
  use: {
    baseURL: 'http://127.0.0.1:4179',
    viewport: { width: 390, height: 844 },
  },
  webServer: {
    command: 'python3 -m http.server 4179 --bind 127.0.0.1 --directory dist',
    url: 'http://127.0.0.1:4179/',
    reuseExistingServer: true,
  },
});
