收口账号菜单侧栏导航
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
ACCOUNT_MENU_KEYS,
|
||||
PRIMARY_NAV_KEYS,
|
||||
getAccountMenuAction,
|
||||
} from "./sidebarNavigation";
|
||||
|
||||
describe("sidebar navigation", () => {
|
||||
it("keeps only client, overview, and sessions in the primary sidebar", () => {
|
||||
expect(PRIMARY_NAV_KEYS).toEqual(["client", "overview", "sessions"]);
|
||||
});
|
||||
|
||||
it("maps account menu entries to internal navigation or commands", () => {
|
||||
expect(ACCOUNT_MENU_KEYS).toEqual([
|
||||
"settings",
|
||||
"appearance",
|
||||
"helpFeedback",
|
||||
"checkUpdate",
|
||||
"logout",
|
||||
]);
|
||||
expect(getAccountMenuAction("settings")).toEqual({ tab: "settings" });
|
||||
expect(getAccountMenuAction("appearance")).toEqual({
|
||||
tab: "settings",
|
||||
settingsFocus: "appearance",
|
||||
});
|
||||
expect(getAccountMenuAction("helpFeedback")).toEqual({ tab: "about" });
|
||||
expect(getAccountMenuAction("checkUpdate")).toEqual({
|
||||
command: "checkUpdate",
|
||||
});
|
||||
expect(getAccountMenuAction("logout")).toEqual({ command: "logout" });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user