Files
jdescopingtool/TestScripts/playwright/playwright.config.ts
T
Joseph Doherty ee044d03e0 feat: add health check endpoint, file upload result handling, and Playwright E2E tests
- Add /health endpoint with anonymous access for monitoring
- Add FileUploadResult<T> model and PostMultipartForFileResultAsync for proper upload response handling
- Add ApiResult.Success() factory method for interface types
- Refactor Login.razor for cleaner code
- Add comprehensive Playwright E2E test suite with fixtures and helpers
2026-01-30 07:12:20 -05:00

41 lines
1.1 KiB
TypeScript

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,
// },
});