diff --git a/tests/e2e/git-no-upstream-polling-churn.spec.ts b/tests/e2e/git-no-upstream-polling-churn.spec.ts index 2cdd1d129f6..6b3ca765fc7 100644 --- a/tests/e2e/git-no-upstream-polling-churn.spec.ts +++ b/tests/e2e/git-no-upstream-polling-churn.spec.ts @@ -3,6 +3,23 @@ import { existsSync, readFileSync, realpathSync, unlinkSync, writeFileSync } fro import type { Page, TestInfo } from '@stablyai/playwright-test' import { test, expect } from './helpers/orca-app' +// This isolated app needs local trace files; network telemetry remains disabled. +test.use({ + orcaAppExtraEnv: { + CI: '', + GITHUB_ACTIONS: '', + GITLAB_CI: '', + CIRCLECI: '', + TRAVIS: '', + BUILDKITE: '', + JENKINS_URL: '', + TEAMCITY_VERSION: '', + ORCA_DIAGNOSTICS_DISABLED: '', + DO_NOT_TRACK: '1', + ORCA_TELEMETRY_DISABLED: '1' + } +}) + // Repro command: // SKIP_BUILD=1 pnpm exec playwright test tests/e2e/git-no-upstream-polling-churn.spec.ts --config tests/playwright.config.ts --project electron-headless --reporter=json // Trigger: active worktree branch "Initi-Project" has no configured upstream @@ -21,6 +38,7 @@ type RendererTimerMeasurement = { } type GitProbeFailureCounts = { + observedGitCommands: number noConfiguredUpstreamFailures: number missingSameNameOriginFailures: number } @@ -138,11 +156,11 @@ async function measureRendererDuringPolling(page: Page): Promise { await selectRepoForActivePolling(orcaPage, testRepoPath, repoPath) const diagnostics = await readDiagnosticsStatus(orcaPage) - test.skip(!diagnostics.localFileEnabled, 'local diagnostic traces are disabled') + expect(diagnostics.localFileEnabled).toBe(true) + expect(diagnostics.bundleEnabled).toBe(false) clearTraceFile(diagnostics) const measurement = await measureRendererDuringPolling(orcaPage) @@ -209,6 +229,10 @@ test.describe('Git no-upstream polling churn repro', () => { const counts = readGitProbeFailureCounts(diagnostics.traceFilePath, repoPath) annotatePolling(testInfo, measurement, counts) + expect( + counts.observedGitCommands, + 'No Git activity was recorded for the measured repo' + ).toBeGreaterThan(0) expect(measurement.maxTimerDriftMs).toBeLessThan(MAX_RENDERER_TIMER_DRIFT_MS) // Why: the #4559 trace showed these stable negative upstream probes being // retried every poll. Under parallel e2e load one in-flight refresh can