perf(e2e): optimize polling intervals in helpers

Phase 1.4 of E2E test optimization:
- TASK_POLL_INTERVAL: 300ms → 150ms
- waitForSyncComplete() stable check: 300ms → 150ms
- waitForSyncComplete() spinner check: 200ms → 100ms
- Dialog loop polling: 200ms → 100ms

Expected impact: 5-10s saved per test (faster detection)
Risk: Low - still reasonable for network operations
This commit is contained in:
Johannes Millan 2026-01-18 15:58:46 +01:00
parent aef7c07921
commit b3ddfcbf20
2 changed files with 5 additions and 5 deletions

View file

@ -473,7 +473,7 @@ export class SuperSyncPage extends BasePage {
await this.conflictApplyBtn.click();
break;
}
await this.page.waitForTimeout(200);
await this.page.waitForTimeout(100); // Reduced from 200ms
}
// Wait for dialog to close
@ -558,13 +558,13 @@ export class SuperSyncPage extends BasePage {
return;
}
await this.page.waitForTimeout(300);
await this.page.waitForTimeout(150); // Reduced from 300ms
continue;
}
// Still spinning - reset stable count
stableCount = 0;
await this.page.waitForTimeout(200);
await this.page.waitForTimeout(100); // Reduced from 200ms
}
throw new Error(`Sync did not complete within ${timeout}ms`);

View file

@ -70,8 +70,8 @@ export const RETRY_BASE_DELAY = 1000;
/** Delay after sync to allow UI to update */
export const POST_SYNC_UI_SETTLE = 1000;
/** Polling interval for waiting for tasks */
export const TASK_POLL_INTERVAL = 300;
/** Polling interval for waiting for tasks (reduced from 300ms) */
export const TASK_POLL_INTERVAL = 150;
/** Default timeout for waiting for a task to appear */
export const TASK_WAIT_TIMEOUT = 30000;