diff --git a/e2e/performance.e2e.spec.ts b/e2e/performance.e2e.spec.ts index 0b3b8fe..110798e 100644 --- a/e2e/performance.e2e.spec.ts +++ b/e2e/performance.e2e.spec.ts @@ -10,13 +10,15 @@ import { test, expect } from '@playwright/test' */ // Performance thresholds (in milliseconds) +// Note: These are CI-friendly thresholds that account for slower runners +// and browser automation overhead (especially on Windows/webkit) const THRESHOLDS = { pageLoad: 3000, // Max time for initial page load - interactionResponse: 150, // Max time for button click response (includes Playwright overhead) - typingLatency: 50, // Max latency per keystroke - tabSwitch: 200, // Max time to switch tabs + interactionResponse: 250, // Max time for button click response (CI overhead) + typingLatency: 75, // Max latency per keystroke + tabSwitch: 350, // Max time to switch tabs widgetCreation: 500, // Max time to create widgets - eventDispatch: 50, // Max time for event dispatch + eventDispatch: 100, // Max time for event dispatch } test.describe('Performance: Page Load', () => { @@ -211,7 +213,7 @@ test.describe('Performance: Event Dispatch', () => { const totalTime = Date.now() - startTime console.log(`Keyboard event time: ${totalTime}ms`) - expect(totalTime).toBeLessThan(1000) // 20 events in 1 second + expect(totalTime).toBeLessThan(1500) // 20 events in 1.5 seconds (CI overhead) }) })