Backend (@backend-dev): - Add ReportService with PDF/CSV generation (reportlab, pandas) - Implement Report API endpoints (POST, GET, DELETE, download) - Add ReportRepository and schemas - Configure storage with auto-cleanup (30 days) - Rate limiting: 10 downloads/minute - Professional PDF templates with charts support Frontend (@frontend-dev): - Integrate Recharts for data visualization - Add CostBreakdown, TimeSeries, ComparisonBar charts - Implement scenario comparison page with multi-select - Add dark/light mode toggle with ThemeProvider - Create Reports page with generation form and list - Add new UI components: checkbox, dialog, tabs, label, skeleton - Implement useComparison and useReports hooks QA (@qa-engineer): - Setup Playwright E2E testing framework - Create 7 test spec files with 94 test cases - Add visual regression testing with baselines - Configure multi-browser testing (Chrome, Firefox, WebKit) - Add mobile responsive tests - Create test fixtures and helpers - Setup GitHub Actions CI workflow Documentation (@spec-architect): - Create detailed kanban-v0.4.0.md with 27 tasks - Update progress.md with v0.4.0 tracking - Create v0.4.0 planning prompt Features: ✅ PDF/CSV Report Generation ✅ Interactive Charts (Pie, Area, Bar) ✅ Scenario Comparison (2-4 scenarios) ✅ Dark/Light Mode Toggle ✅ E2E Test Suite (94 tests) Dependencies added: - Backend: reportlab, pandas, slowapi - Frontend: recharts, date-fns, @radix-ui/react-checkbox/dialog/tabs - Testing: @playwright/test 27 tasks completed, 100% v0.4.0 implementation
113 lines
2.4 KiB
TypeScript
113 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: '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,
|
|
},
|
|
|
|
// Output directory for test artifacts
|
|
outputDir: path.join(__dirname, 'e2e-results'),
|
|
|
|
// Timeout for each test
|
|
timeout: 60000,
|
|
|
|
// Expect timeout for assertions
|
|
expect: {
|
|
timeout: 10000,
|
|
},
|
|
|
|
// Global setup and teardown
|
|
globalSetup: require.resolve('./e2e/global-setup.ts'),
|
|
globalTeardown: require.resolve('./e2e/global-teardown.ts'),
|
|
});
|