Files
mockupAWS/frontend/playwright.config.ts
Luca Sacchi Ricciardi 94db0804d1
Some checks failed
E2E Tests / Run E2E Tests (push) Has been cancelled
E2E Tests / Visual Regression Tests (push) Has been cancelled
E2E Tests / Smoke Tests (push) Has been cancelled
feat: complete v0.4.0 implementation - Reports, Charts, Comparison, Dark Mode
Backend (@backend-dev):
- ReportService with PDF/CSV generation (reportlab, pandas)
- Report API endpoints (POST, GET, DELETE, download with rate limiting)
- Professional PDF templates with branding and tables
- Storage management with auto-cleanup

Frontend (@frontend-dev):
- Recharts integration: CostBreakdown, TimeSeries, ComparisonBar
- Scenario comparison: multi-select, compare page with side-by-side layout
- Reports UI: generation form, list with status badges, download
- Dark/Light mode: ThemeProvider, toggle, CSS variables
- Responsive design for all components

QA (@qa-engineer):
- E2E testing setup with Playwright
- 100 test cases across 7 spec files
- Visual regression baselines
- CI/CD workflow configuration
- ES modules fixes

Documentation:
- Add todo.md with testing checklist and future roadmap
- Update kickoff prompt for v0.4.0

27 tasks completed, 100% v0.4.0 delivery

Closes: v0.4.0 milestone
2026-04-07 17:46:47 +02:00

115 lines
2.4 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
import path from 'path';
/**
* Playwright configuration for mockupAWS E2E testing
* @see https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
// Test directory
testDir: './e2e',
// Run tests in files in parallel
fullyParallel: true,
// Fail the build on CI if you accidentally left test.only in the source code
forbidOnly: !!process.env.CI,
// Retry on CI only
retries: process.env.CI ? 2 : 0,
// Opt out of parallel tests on CI for stability
workers: process.env.CI ? 1 : undefined,
// Reporter to use
reporter: [
['html', { outputFolder: 'e2e-report' }],
['list'],
['junit', { outputFile: 'e2e-report/results.xml' }],
],
// Shared settings for all the projects below
use: {
// Base URL to use in actions like `await page.goto('/')`
baseURL: process.env.TEST_BASE_URL || 'http://localhost:5173',
// Collect trace when retrying the failed test
trace: 'on-first-retry',
// Capture screenshot on failure
screenshot: 'only-on-failure',
// Record video for debugging
video: 'on-first-retry',
// Action timeout
actionTimeout: 15000,
// Navigation timeout
navigationTimeout: 30000,
// Viewport size
viewport: { width: 1280, height: 720 },
},
// Configure projects for major browsers
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
// Mobile viewports
{
name: 'Mobile Chrome',
use: { ...devices['Pixel 5'] },
},
{
name: 'Mobile Safari',
use: { ...devices['iPhone 12'] },
},
// Tablet viewport
{
name: 'Tablet',
use: { ...devices['iPad Pro 11'] },
},
],
// Run local dev server before starting the tests
webServer: {
command: 'npm run dev',
url: 'http://localhost:5173',
reuseExistingServer: !process.env.CI,
timeout: 120 * 1000,
stdout: 'pipe',
stderr: 'pipe',
},
// Output directory for test artifacts
outputDir: 'e2e-results',
// Timeout for each test
timeout: 60000,
// Expect timeout for assertions
expect: {
timeout: 10000,
},
// Global setup and teardown
globalSetup: './e2e/global-setup.ts',
globalTeardown: './e2e/global-teardown.ts',
});