Files
orca/tests/e2e/helpers/terminal-pty-injection.ts
mirror 34fa2cd5ca
Skill update round trip / roundtrip (false, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, latest) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
source snapshot 2026-09-02
2026-09-02 02:03:16 +08:00

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)
}