swarm ui: the login button's wording is a tested function
The label that switches between log in and log in again moves next to the stored login's other wording, so it has a test.
This commit is contained in:
parent
e9ddfd61ec
commit
78e063e78c
1 changed files with 18 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ import { test } from "node:test";
|
|||
import {
|
||||
deleteMessage,
|
||||
deleteStoredLoginPath,
|
||||
loginButtonLabel,
|
||||
storedAtMs,
|
||||
storedLoginPath,
|
||||
} from "../src/agent/claude-login/StoredLogin.ts";
|
||||
|
|
@ -32,3 +33,11 @@ test("the delete's confirmation names the agent", () => {
|
|||
assert.match(deleteMessage("atlas"), /stored claude login for atlas/);
|
||||
assert.match(deleteMessage("atlas"), /logged out within 5 minutes/);
|
||||
});
|
||||
|
||||
test("the login button says log in until a login is stored, then log in again", () => {
|
||||
assert.equal(loginButtonLabel({ stored_at: null }), "log in");
|
||||
assert.equal(
|
||||
loginButtonLabel({ stored_at: "2026-11-10T12:00:00Z" }),
|
||||
"log in again",
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue