test(terminals): give script ownership the same 10s wait as the rest of the test

The first wait used the 1s default. On a slow Windows runner the observed
terminal list reports script ownership later than that. The assertion now
prints the observed terminals when it fails.
This commit is contained in:
Mohamed Boudra
2026-11-25 17:37:32 +01:00
parent 8338e77f46
commit 825fa04467
@@ -366,10 +366,15 @@ test("terminal collection reports workspace script ownership after runtime regis
try {
expect((await client.startWorkspaceScript(workspaceId, "sleeper")).error).toBeNull();
await expect
.poll(() =>
terminals.some((terminal) => terminal.workspaceId === workspaceId && terminal.isScript),
.poll(
() =>
terminals.map((terminal) => ({
workspaceId: terminal.workspaceId,
isScript: terminal.isScript,
})),
{ timeout: 10_000 },
)
.toBe(true);
.toContainEqual({ workspaceId, isScript: true });
const terminalId = terminals.find((terminal) => terminal.workspaceId === workspaceId)!.id;
const pidFile = path.join(cwd, "sleeper.pid");
await expect