33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
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" });
|
|
});
|
|
});
|