swarm-ui: stop a claude login whose dialog closed while it was starting
This commit is contained in:
parent
20e2f53592
commit
41cc2f5e8e
3 changed files with 24 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import {
|
|||
claudeLoginPath,
|
||||
leavesLoginRunning,
|
||||
pastedCode,
|
||||
startOutlivedDialog,
|
||||
} from "../src/agent/claude-login/ClaudeLoginSteps.ts";
|
||||
|
||||
test("the routes name the agent, escaped", () => {
|
||||
|
|
@ -48,6 +49,12 @@ test("only a login waiting for its code is stopped on close", () => {
|
|||
assert.equal(leavesLoginRunning({ step: "stored" }), false);
|
||||
});
|
||||
|
||||
test("a start that answers after the dialog closed is stopped, unless it failed", () => {
|
||||
assert.equal(startOutlivedDialog(false, null), true);
|
||||
assert.equal(startOutlivedDialog(true, null), false);
|
||||
assert.equal(startOutlivedDialog(false, { detail: "no minter" }), false);
|
||||
});
|
||||
|
||||
test("a pasted code is trimmed, and a blank one is nothing", () => {
|
||||
assert.equal(pastedCode(" abc-def \n"), "abc-def");
|
||||
assert.equal(pastedCode(" \n "), null);
|
||||
|
|
|
|||
Loading…
Reference in a new issue