mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
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:
parent
aef7c07921
commit
b3ddfcbf20
2 changed files with 5 additions and 5 deletions
|
|
@ -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`);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue