feat: implement v0.4.0 - Reports, Charts, Comparison, Dark Mode, E2E Testing
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
This commit is contained in:
117
frontend/e2e/fixtures/test-logs.ts
Normal file
117
frontend/e2e/fixtures/test-logs.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
/**
|
||||
* Test Logs Fixtures
|
||||
*
|
||||
* Sample log data for E2E testing
|
||||
*/
|
||||
|
||||
export interface TestLog {
|
||||
timestamp: string;
|
||||
level: 'INFO' | 'WARN' | 'ERROR' | 'DEBUG';
|
||||
message: string;
|
||||
service: string;
|
||||
metadata?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export const testLogs: TestLog[] = [
|
||||
{
|
||||
timestamp: new Date().toISOString(),
|
||||
level: 'INFO',
|
||||
message: 'Application started successfully',
|
||||
service: 'lambda',
|
||||
metadata: {
|
||||
functionName: 'test-function',
|
||||
memorySize: 512,
|
||||
duration: 1250,
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamp: new Date(Date.now() - 1000).toISOString(),
|
||||
level: 'INFO',
|
||||
message: 'Processing SQS message batch',
|
||||
service: 'sqs',
|
||||
metadata: {
|
||||
queueName: 'test-queue',
|
||||
batchSize: 10,
|
||||
messageCount: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamp: new Date(Date.now() - 2000).toISOString(),
|
||||
level: 'INFO',
|
||||
message: 'Bedrock LLM invocation completed',
|
||||
service: 'bedrock',
|
||||
metadata: {
|
||||
modelId: 'anthropic.claude-3-sonnet-20240229-v1:0',
|
||||
inputTokens: 150,
|
||||
outputTokens: 250,
|
||||
duration: 2345,
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamp: new Date(Date.now() - 3000).toISOString(),
|
||||
level: 'WARN',
|
||||
message: 'Potential PII detected in request',
|
||||
service: 'lambda',
|
||||
metadata: {
|
||||
piiType: 'EMAIL',
|
||||
confidence: 0.95,
|
||||
masked: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamp: new Date(Date.now() - 4000).toISOString(),
|
||||
level: 'ERROR',
|
||||
message: 'Failed to process message after 3 retries',
|
||||
service: 'sqs',
|
||||
metadata: {
|
||||
errorCode: 'ProcessingFailed',
|
||||
retryCount: 3,
|
||||
deadLetterQueue: true,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const logsWithPII: TestLog[] = [
|
||||
{
|
||||
timestamp: new Date().toISOString(),
|
||||
level: 'INFO',
|
||||
message: 'User login: john.doe@example.com',
|
||||
service: 'lambda',
|
||||
metadata: {
|
||||
userId: 'user-12345',
|
||||
email: 'john.doe@example.com',
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamp: new Date(Date.now() - 1000).toISOString(),
|
||||
level: 'INFO',
|
||||
message: 'Payment processed for card ending 4532',
|
||||
service: 'lambda',
|
||||
metadata: {
|
||||
cardLastFour: '4532',
|
||||
amount: 99.99,
|
||||
currency: 'USD',
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamp: new Date(Date.now() - 2000).toISOString(),
|
||||
level: 'INFO',
|
||||
message: 'Phone verification: +1-555-123-4567',
|
||||
service: 'lambda',
|
||||
metadata: {
|
||||
phone: '+1-555-123-4567',
|
||||
verified: true,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const highVolumeLogs: TestLog[] = Array.from({ length: 100 }, (_, i) => ({
|
||||
timestamp: new Date(Date.now() - i * 100).toISOString(),
|
||||
level: i % 10 === 0 ? 'ERROR' : i % 5 === 0 ? 'WARN' : 'INFO',
|
||||
message: `Log entry ${i + 1}: ${i % 3 === 0 ? 'SQS message processed' : i % 3 === 1 ? 'Lambda invoked' : 'Bedrock API call'}`,
|
||||
service: i % 3 === 0 ? 'sqs' : i % 3 === 1 ? 'lambda' : 'bedrock',
|
||||
metadata: {
|
||||
sequenceNumber: i + 1,
|
||||
batchId: `batch-${Math.floor(i / 10)}`,
|
||||
},
|
||||
}));
|
||||
Reference in New Issue
Block a user