Open History to see the last commit
1import { describe, expect, it } from "vite-plus/test";
2
3import { resolveThreadPanelPresentation } from "./rightPanelLayout";
4
5describe("resolveThreadPanelPresentation", () => {
6 it("uses the stable workspace width minus the real right panel width", () => {
7 expect(resolveThreadPanelPresentation(null, 0, false)).toBe("inline");
8 expect(resolveThreadPanelPresentation(1_104, 0, false)).toBe("inline");
9 expect(resolveThreadPanelPresentation(1_103, 0, false)).toBe("popover");
10
11 expect(resolveThreadPanelPresentation(1_400, 0, false)).toBe("inline");
12 expect(resolveThreadPanelPresentation(1_400, 540, false)).toBe("popover");
13 expect(resolveThreadPanelPresentation(1_644, 540, false)).toBe("inline");
14 });
15
16 it("uses a popover while the real right panel is maximized", () => {
17 expect(resolveThreadPanelPresentation(2_000, 0, true)).toBe("popover");
18 });
19});