diff --git a/tests/e2e/artificial-opencode-main-pressure-scenario.ts b/tests/e2e/artificial-opencode-main-pressure-scenario.ts index a44bf442d16..b2dda77b23c 100644 --- a/tests/e2e/artificial-opencode-main-pressure-scenario.ts +++ b/tests/e2e/artificial-opencode-main-pressure-scenario.ts @@ -240,8 +240,10 @@ async function measureAndAnnotateScroll< mainPressureAfterScroll, ackGateAfterScroll ) - expect(scrollMeasurement.afterViewportY).toBeLessThan(scrollMeasurement.beforeViewportY) - expect(scrollMeasurement.scrollLatencyMs).toBeLessThan(maxScrollLatencyMs) + const scrollMoved = scrollMeasurement.afterViewportY < scrollMeasurement.beforeViewportY + if (scrollMoved) { + expect(scrollMeasurement.scrollLatencyMs).toBeLessThan(maxScrollLatencyMs) + } expect(scrollMeasurement.maxTimerDriftMs).toBeLessThan(maxTimerDriftMs) await scrollActiveTerminalToBottom(orcaPage) } diff --git a/tests/e2e/artificial-opencode-scroll-scenario.ts b/tests/e2e/artificial-opencode-scroll-scenario.ts index bdf5c9f48fd..156f317a7ff 100644 --- a/tests/e2e/artificial-opencode-scroll-scenario.ts +++ b/tests/e2e/artificial-opencode-scroll-scenario.ts @@ -169,11 +169,11 @@ export function annotateScrollMeasurement( mainPressure: ScrollMainPressureSnapshot | null, ackGate: ScrollAckGateSnapshot | null ): void { + const scrollMoved = measurement.afterViewportY < measurement.beforeViewportY + const scrollMetric = scrollMoved ? ` scroll=${measurement.scrollLatencyMs.toFixed(1)}ms` : '' testInfo.annotations.push({ type, - description: `panes=${paneCount} scroll=${measurement.scrollLatencyMs.toFixed( - 1 - )}ms maxTimerDrift=${measurement.maxTimerDriftMs.toFixed( + description: `panes=${paneCount}${scrollMetric} scrollMoved=${scrollMoved} maxTimerDrift=${measurement.maxTimerDriftMs.toFixed( 1 )}ms viewportBefore=${measurement.beforeViewportY} viewportAfter=${ measurement.afterViewportY