// CI: PLAYWRIGHT_BASE_URL = öffentliche Dev-/Prod-URL (HTTPS über Reverse Proxy), nicht localhost
// Lokal: export PLAYWRIGHT_BASE_URL=http://192.168.x.x:3098

const rawBase =
  process.env.PLAYWRIGHT_BASE_URL ||
  process.env.BASE_URL ||
  'http://127.0.0.1:3098';

module.exports = {
  testDir: './tests',
  timeout: 30000,
  use: {
    // channel: 'chrome',  // Entfernt: nutze Standard-Chromium statt Google Chrome
    headless: true,
    viewport: { width: 390, height: 844 },
    screenshot: 'only-on-failure',
    baseURL: rawBase.replace(/\/$/, ''),
  },
  reporter: 'list',
};
