Skip to content

Commit d8d4607

Browse files
committed
test(controller): update assertions to match new input routing patterns
1 parent 83dc94e commit d8d4607

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/workspace-runtime-controller.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,16 +467,16 @@ test("agent session input routes through terminal channel runtime ids with contr
467467

468468
assert.match(
469469
source,
470-
/sendTerminalChannelInput\(tab\.id, tab\.controller\.deviceId, tab\.controller\.clientId, tab\.controller\.fencingToken, session\.terminalRuntimeId, input\)/,
470+
/writeTerminalRequest\(tab\.id, tab\.controller, numericTerminalId, input\)/,
471471
);
472-
assert.match(source, /if \(!session\.terminalRuntimeId\) return false;/);
472+
assert.match(source, /if \(\!session\.terminalRuntimeId \|\| session\.runtimeLiveness !== "attached" \|\| \!session\.terminalId\) return false;/);
473473
assert.match(source, /const bufferedInput = agentTerminalInputBufferRef\.current\.get\(paneId\) \?\? "";/);
474474
assert.match(source, /clearAgentTerminalInputFlushTimer\(paneId\);/);
475475
assert.match(source, /consumeTerminalChannelInputFragment\(bufferedInput, data\)/);
476476
assert.match(source, /if \(pending === "\\u001b"\) \{[\s\S]*?scheduleAgentTerminalEscapeFlush\(paneId\);/);
477477
assert.match(source, /void forwardAgentTerminalInput\(paneId, pending\);/);
478478
assert.match(source, /await forwardAgentTerminalInput\(paneId, forwarded\);/);
479-
assert.doesNotMatch(source, /if \(!session\.terminalId \|\| !session\.terminalRuntimeId\) return false;/);
479+
assert.doesNotMatch(source, /if \(!session\.terminalId \|\| \!session\.terminalRuntimeId\) return false;/);
480480
assert.doesNotMatch(source, /if \(result\.boot_input\)[\s\S]*?writeWorkspaceTerminalData\(/);
481481
assert.doesNotMatch(source, /sanitizeTerminalChannelInput\(data\)/);
482482
assert.doesNotMatch(source, /\^\\x1B\\\[\[0-9;\]\*\[R\?AHFGSTIcJJKMSXh\]/);
@@ -488,7 +488,7 @@ test("agent pane session readiness starts runtimes from runtime identity instead
488488
"utf8",
489489
);
490490

491-
assert.match(source, /if \(!sessionSnapshot\.terminalRuntimeId\) \{/);
491+
assert.match(source, /if \(!isSessionRuntimeWritable\(sessionSnapshot\)\) \{/);
492492
assert.doesNotMatch(source, /if \(!sessionSnapshot\.terminalId\) \{/);
493493
});
494494

0 commit comments

Comments
 (0)