feat(auth): add remembered local login to the frontend
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user