fix(frontend): hide server-authenticated user identity
This commit is contained in:
@@ -65,7 +65,7 @@ describe("authenticated shell permissions", () => {
|
||||
expect(screen.getByRole("button", { name: "All sessions" })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test("hides logout outside local authentication while preserving the identity", async () => {
|
||||
test("hides identity and logout outside local authentication", async () => {
|
||||
let logoutCalls = 0;
|
||||
server.use(http.post("/api/auth/logout", () => {
|
||||
logoutCalls += 1;
|
||||
@@ -79,7 +79,7 @@ describe("authenticated shell permissions", () => {
|
||||
permissions: ["session.use"],
|
||||
}, false);
|
||||
|
||||
expect(await screen.findByText("portal-user")).toBeInTheDocument();
|
||||
await waitFor(() => expect(screen.queryByText("portal-user")).not.toBeInTheDocument());
|
||||
expect(screen.queryByRole("button", { name: "Log out" })).not.toBeInTheDocument();
|
||||
expect(logoutCalls).toBe(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user