import { defineConfig, devices } from '@playwright/test'; export default defineConfig({ testDir: './tests', fullyParallel: false, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: 1, reporter: 'html', // Increase timeout for Blazor WASM initialization timeout: 180000, // 3 minutes per test expect: { timeout: 30000, // 30 seconds for assertions }, use: { baseURL: process.env.BASE_URL || 'http://localhost:5294', trace: 'on-first-retry', screenshot: 'only-on-failure', // Longer timeouts for Blazor WASM navigationTimeout: 120000, // 2 minutes for page load actionTimeout: 30000, // 30 seconds for actions }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, ], /* Run local dev server before starting tests */ // webServer: { // command: 'dotnet run --project ../NEW/src/JdeScoping.Host/JdeScoping.Host.csproj', // url: 'http://localhost:5294', // reuseExistingServer: !process.env.CI, // }, });