mirror of
https://github.com/stablyai/orca.git
synced 2026-09-24 00:02:24 +00:00
* test: target terminal viewport for scroll perf probe
* Revert "Make Smart New Tab launcher the default (remove experimental flag) (#4834)"
This reverts commit c32e2dc7cb.
* test: stabilize release e2e expectations
* test: stabilize release e2e gates
* test: make terminal scroll probe deterministic
* test: keep flaky scroll probe informational
31 lines
900 B
TypeScript
31 lines
900 B
TypeScript
import type { Page } from '@stablyai/playwright-test'
|
|
import { expect } from '@stablyai/playwright-test'
|
|
|
|
type TerminalPtyDataInjectionWindow = Window & {
|
|
__terminalPtyDataInjection?: {
|
|
keys: () => string[]
|
|
}
|
|
}
|
|
|
|
export async function waitForTerminalPtyDataInjector(
|
|
page: Page,
|
|
paneKey: string,
|
|
timeoutMs = 15_000
|
|
): Promise<void> {
|
|
await expect
|
|
.poll(
|
|
() =>
|
|
page.evaluate((targetPaneKey) => {
|
|
const injector = (window as TerminalPtyDataInjectionWindow).__terminalPtyDataInjection
|
|
return injector?.keys().includes(targetPaneKey) ?? false
|
|
}, paneKey),
|
|
{
|
|
timeout: timeoutMs,
|
|
// Why: pane routing can settle before TerminalPane's e2e-only data
|
|
// injector effect has registered the renderer callback.
|
|
message: `terminal PTY data injector did not register for ${paneKey}`
|
|
}
|
|
)
|
|
.toBe(true)
|
|
}
|