Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

test(handoff-browser): wait for the asker's first turn before removing its finish gate

AdityaUmale4a7e56f82e60
diff --git a/server/surface-pins.e2e.test.ts b/server/surface-pins.e2e.test.ts
index f1b9e2b95c..8aaf3ba853 100644
--- a/server/surface-pins.e2e.test.ts
+++ b/server/surface-pins.e2e.test.ts
@@ -503,6 +503,8 @@ describe("surface pin provenance against the real server", () => {
.tasks.find((task: any) => task.openedBy?.botId === asker.id).threadId as string;
rmSync(teammateDump, { force: true });
// Hold the asker's own turn that resumes with the result, to check it is not offered the hand-off's browser move.
+ // Its first turn must have used up the finish gate before the gate is removed for the resumed turn.
+ await idle(asker.id, own.threadId);
rmSync(dumpFile, { force: true });
rmSync(finishFile, { force: true });
writeFileSync(teammateFinish, "finish");