import type { PlaywrightTestConfig } from '@playwright/test';

const config: PlaywrightTestConfig = {
    webServer: {
        command: 'npm run dev',
        port: 5173,
        reuseExistingServer: true,
    },
    testDir: 'tests',
    testMatch: 'tests/**/*.test.ts',
    testIgnore: ['tests/disabled/**'],
    reporter: 'list',
    use: {
        baseURL: 'http://demo.localhost:5173',
        // baseURL: 'https://dev-demo.oneskyit.com',
        trace: 'on-first-retry',
        // Arch Linux: Playwright's downloaded Chromium requires Ubuntu system libs (libicu74 etc.)
        // that don't exist on Arch. Use the system Chromium package instead.
        launchOptions: {
            executablePath: '/usr/bin/chromium',
        },
    }
};

export default config;
