mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 02:29:33 +01:00
main.rs was the only source file without tests, and it held three decisions with real failure modes: - Which login a connect goes out with. The choice was a closure body inside the probe worker; it is now choose_login, tested for every row: typed wins, then the Keychain, then the local Codeman's own login, which is used only when no saved password was expected and only for the same username. - What the Keychain keeps afterwards (update_keychain): saved or deleted by Remember, never a copy of the local server's login, never a password the server wants changed, and the old user's item deleted before the new save. The in-memory Keychain store moves out of credentials' test module so other test modules can use it. - When a commit in the main window means the server page is loaded. The connect page had only substring checks in the repository; the checks that drove it lived in a scratch script. They are now test/desktop-connect-page.browser.test.ts: Chromium, the page's real CSP, a stubbed native side, five ordered walks through every state of both tabs (first run, logins, failures, redirects, Start, the install wait, the SSH install, layout, double clicks, keys, a starting server, a WebKit too old). Listed in BROWSER_TEST_GLOBS, so the nightly browser suite runs it and `npm test` does not. Also pins the install one-liner the page shows to the one Copy copies. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>