Squashed 'third_party/pi/' content from commit d981de122
git-subtree-dir: third_party/pi git-subtree-split: d981de1229ef899957bbe968bc8dcda02a21f477
This commit is contained in:
26
packages/coding-agent/test/chat-viewport.test.ts
Normal file
26
packages/coding-agent/test/chat-viewport.test.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { Container } from "@earendil-works/pi-tui";
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { createChatViewport } from "../src/modes/interactive/chat-viewport.ts";
|
||||
|
||||
describe("chat viewport", () => {
|
||||
test("defaults the transcript scrollbar to auto and accepts overrides", () => {
|
||||
const automatic = createChatViewport({
|
||||
document: new Container(),
|
||||
pendingMessages: new Container(),
|
||||
status: new Container(),
|
||||
editor: new Container(),
|
||||
footer: new Container(),
|
||||
});
|
||||
const hidden = createChatViewport({
|
||||
document: new Container(),
|
||||
pendingMessages: new Container(),
|
||||
status: new Container(),
|
||||
editor: new Container(),
|
||||
footer: new Container(),
|
||||
scrollbar: "hidden",
|
||||
});
|
||||
|
||||
expect(automatic.transcript.scrollbar).toBe("auto");
|
||||
expect(hidden.transcript.scrollbar).toBe("hidden");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user