test(e2e): unbreak tool call shimmer gate and increase eviction test timeout

This commit is contained in:
Mohamed Boudra
2026-08-18 22:51:11 +02:00
parent f9e1def954
commit f1eeef32ac
2 changed files with 4 additions and 8 deletions
@@ -1272,7 +1272,7 @@ test.describe("Agent message submission", () => {
test("keeps a streaming hidden submission before its output after workspace eviction", async ({ test("keeps a streaming hidden submission before its output after workspace eviction", async ({
page, page,
}, testInfo) => { }, testInfo) => {
test.setTimeout(120_000); test.setTimeout(240_000);
await expectHiddenStreamingSubmissionOrderAfterWorkspaceEviction(page, testInfo); await expectHiddenStreamingSubmissionOrderAfterWorkspaceEviction(page, testInfo);
}); });
@@ -101,16 +101,11 @@ async function gateSecondToolCall(page: Page, agentId: string) {
firstCallId = toolCall.callId; firstCallId = toolCall.callId;
} }
if (toolCall.callId === firstCallId) { if (toolCall.callId === firstCallId) {
if (toolCall.status === "running" || toolCall.status === "executing") { ws.send(message);
return;
}
if (toolCall.status === "completed") { if (toolCall.status === "completed") {
// The mock tool completes inside the daemon's coalescing window, so the
// browser naturally receives its authoritative completed state first.
ws.send(message);
resolveFirstCompleted(); resolveFirstCompleted();
return;
} }
return;
} }
secondCallId ??= toolCall.callId; secondCallId ??= toolCall.callId;
@@ -148,6 +143,7 @@ async function gateSecondToolCall(page: Page, agentId: string) {
waitForSecondRunning: () => secondRunning, waitForSecondRunning: () => secondRunning,
releaseSecondRunning() { releaseSecondRunning() {
releaseSecondRequested = true; releaseSecondRequested = true;
pauseServerMessages = false;
if (secondRunningMessage) { if (secondRunningMessage) {
forwardSecondRunning?.(); forwardSecondRunning?.();
} }