feat(auth): add remembered local login to the frontend

This commit is contained in:
2026-08-17 04:52:39 +02:00
parent 8c67cb75dc
commit 202822f3ba
36 changed files with 2649 additions and 163 deletions
+10 -2
View File
@@ -1,7 +1,15 @@
import { render, screen } from "@testing-library/react";
import { http, HttpResponse } from "msw";
import { server } from "./test/msw";
import { App } from "./App";
test("App renders the shell with create affordance", () => {
test("App renders the shell with create affordance after authentication", async () => {
server.use(
http.get("/api/settings", () => HttpResponse.json({ workspace: "psd", provider: "zai", model: "glm-5.2", thinking: "medium" })),
http.get("/api/workspaces", () => HttpResponse.json([])),
http.get("/api/models", () => HttpResponse.json({ models: [] })),
http.get("/api/sessions", () => HttpResponse.json([])),
);
render(<App />);
expect(screen.getByRole("button", { name: /new/i })).toBeInTheDocument();
expect(await screen.findByRole("button", { name: /new/i })).toBeInTheDocument();
});