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
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
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,
|
||||
// },
|
||||
});
|
||||
Reference in New Issue
Block a user