feat(auth): add remembered local login to the frontend
This commit is contained in:
@@ -6,6 +6,7 @@ import { server } from "../test/msw";
|
||||
import { FakeEventSource } from "../test/fakeEventSource";
|
||||
import { useSessionStore } from "../store/sessionStore";
|
||||
import { AppShell } from "./AppShell";
|
||||
import { clearAuthState, setAuthState } from "../auth/authState";
|
||||
import { workspacePreferences } from "../workspaces/preferences";
|
||||
|
||||
function renderShell() {
|
||||
@@ -14,6 +15,11 @@ function renderShell() {
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
clearAuthState();
|
||||
setAuthState({
|
||||
issuer: "test", subject: "test", roles: ["user"], permissions: ["session.use"],
|
||||
isAdmin: false, csrfToken: null, session: null,
|
||||
});
|
||||
localStorage.clear();
|
||||
FakeEventSource.instances = [];
|
||||
(globalThis as any).EventSource = FakeEventSource;
|
||||
|
||||
Reference in New Issue
Block a user