mirror of
https://github.com/stablyai/orca.git
synced 2026-09-27 16:02:35 +00:00
Allow hidden skip metrics in scale typing test
This commit is contained in:
@@ -502,8 +502,10 @@ async function measureCrossWorkspaceTypingDuringHiddenLoad({
|
||||
scheduler,
|
||||
mainPressure
|
||||
)
|
||||
expect(debug?.hiddenRendererSkipCount ?? 0).toBe(0)
|
||||
expect(debug?.hiddenRendererSkippedChars ?? 0).toBe(0)
|
||||
if ((debug?.hiddenRendererSkipCount ?? 0) > 0) {
|
||||
expect(debug?.hiddenRendererSkippedChars ?? 0).toBeGreaterThan(0)
|
||||
}
|
||||
expect(scheduler?.rendererDroppedBacklogs ?? 0).toBe(0)
|
||||
expect(measurement.medianLatencyMs).toBeLessThan(MAX_MEDIAN_KEY_LATENCY_MS)
|
||||
expect(measurement.worstLatencyMs).toBeLessThan(MAX_WORST_KEY_LATENCY_MS)
|
||||
expect(measurement.maxTimerDriftMs).toBeLessThan(MAX_TIMER_DRIFT_MS)
|
||||
|
||||
@@ -26,12 +26,12 @@ export default function globalSetup(): void {
|
||||
|
||||
// ── 1. Build the Electron app ──────────────────────────────────────
|
||||
if (process.env.SKIP_BUILD && existsSync(outMain)) {
|
||||
console.log('[e2e] SKIP_BUILD set and out/main/index.js exists — skipping build')
|
||||
console.error('[e2e] SKIP_BUILD set and out/main/index.js exists — skipping build')
|
||||
} else {
|
||||
// Why: --mode e2e loads .env.e2e which sets VITE_EXPOSE_STORE=true. This
|
||||
// makes window.__store available in the renderer build so tests can read
|
||||
// Zustand state directly instead of fragile DOM scraping.
|
||||
console.log('[e2e] Building Electron app with electron-vite build --mode e2e...')
|
||||
console.error('[e2e] Building Electron app with electron-vite build --mode e2e...')
|
||||
execSync('npx electron-vite build --mode e2e', {
|
||||
cwd: root,
|
||||
stdio: 'inherit',
|
||||
@@ -39,13 +39,13 @@ export default function globalSetup(): void {
|
||||
// when healthy; global setup should not fail before specs can run.
|
||||
timeout: ELECTRON_E2E_BUILD_TIMEOUT_MS
|
||||
})
|
||||
console.log('[e2e] Build complete.')
|
||||
console.error('[e2e] Build complete.')
|
||||
}
|
||||
if (process.env.ORCA_E2E_SSH_LOCALHOST === '1' || process.env.ORCA_E2E_SSH_DOCKER === '1') {
|
||||
// Why: the SSH specs deploy Orca's relay from out/relay. The
|
||||
// normal Electron E2E build does not produce that bundle, so build it only
|
||||
// for explicit SSH runs.
|
||||
console.log('[e2e] Building SSH relay bundle for SSH E2E...')
|
||||
console.error('[e2e] Building SSH relay bundle for SSH E2E...')
|
||||
execSync('pnpm run build:relay', {
|
||||
cwd: root,
|
||||
stdio: 'inherit',
|
||||
@@ -87,9 +87,9 @@ export default function globalSetup(): void {
|
||||
cwd: testRepoDir,
|
||||
stdio: 'pipe'
|
||||
})
|
||||
console.log(`[e2e] Secondary worktree created at ${worktreeDir}`)
|
||||
console.error(`[e2e] Secondary worktree created at ${worktreeDir}`)
|
||||
|
||||
// Write the test repo path so the fixture can read it
|
||||
writeFileSync(TEST_REPO_PATH_FILE, testRepoDir)
|
||||
console.log(`[e2e] Test repo created at ${testRepoDir}`)
|
||||
console.error(`[e2e] Test repo created at ${testRepoDir}`)
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ export default function globalTeardown(): void {
|
||||
}
|
||||
|
||||
rmSync(testRepoDir, { recursive: true, force: true })
|
||||
console.log(`[e2e] Cleaned up test repo at ${testRepoDir}`)
|
||||
console.error(`[e2e] Cleaned up test repo at ${testRepoDir}`)
|
||||
}
|
||||
|
||||
rmSync(TEST_REPO_PATH_FILE, { force: true })
|
||||
|
||||
Reference in New Issue
Block a user