import { defineConfig, devices } from '@playwright/test'; /** * Playwright configuration for real API integration tests * Uses actual Oracle database connections and real credentials * No API mocking - full end-to-end testing with ROMFAST data */ export default defineConfig({ testDir: './tests/integration', fullyParallel: false, // Run sequentially for real data tests forbidOnly: !!process.env.CI, retries: process.env.CI ? 1 : 0, // Fewer retries for real API tests workers: 1, // Single worker to avoid conflicts with real data timeout: 60000, // Longer timeout for real API calls reporter: [ ['html', { outputFolder: 'playwright-report-integration' }], ['json', { outputFile: 'test-results/integration-results.json' }], ['junit', { outputFile: 'test-results/integration-junit.xml' }] ], use: { baseURL: 'http://localhost:3001', trace: 'on', screenshot: 'only-on-failure', video: 'retain-on-failure', // Extended timeouts for real API interactions actionTimeout: 15000, navigationTimeout: 30000, // No API route interception - use real backend ignoreHTTPSErrors: true, }, projects: [ { name: 'real-api-chrome', use: { ...devices['Desktop Chrome'], // Additional Chrome flags for testing launchOptions: { args: [ '--disable-web-security', '--disable-features=VizDisplayCompositor', '--no-sandbox' ] } }, }, { name: 'real-api-firefox', use: { ...devices['Desktop Firefox'], }, } ], // Global setup and teardown for real API tests globalSetup: './tests/integration/global-setup.js', globalTeardown: './tests/integration/global-teardown.js', // Environment-specific configurations metadata: { testType: 'integration', environment: 'development', backend: 'http://localhost:8000', frontend: 'http://localhost:3001', database: 'Oracle via SSH tunnel', credentials: 'Real Oracle credentials' } });