chat-layout.spec.ts 989 B

1234567891011121314151617181920212223242526
  1. import { describe, expect, it } from "vitest"
  2. import {
  3. getChatBarVisibility,
  4. shouldShowRightDockChat,
  5. shouldShowWritingChat,
  6. } from "./chat-layout"
  7. describe("chat layout docking", () => {
  8. it("shows the writing chat in the bottom dock by default", () => {
  9. expect(getChatBarVisibility(true, "bottom")).toBe("expanded")
  10. expect(shouldShowWritingChat(true, "bottom")).toBe(true)
  11. expect(shouldShowRightDockChat(true, "bottom")).toBe(false)
  12. })
  13. it("moves the writing chat to the right dock when configured", () => {
  14. expect(getChatBarVisibility(true, "right")).toBe("hidden")
  15. expect(shouldShowWritingChat(true, "right")).toBe(false)
  16. expect(shouldShowRightDockChat(true, "right")).toBe(true)
  17. })
  18. it("keeps every dock hidden when chat is collapsed", () => {
  19. expect(getChatBarVisibility(false, "bottom")).toBe("hidden")
  20. expect(shouldShowWritingChat(false, "bottom")).toBe(false)
  21. expect(shouldShowRightDockChat(false, "right")).toBe(false)
  22. })
  23. })