feat(web): polish master chat with model selector, params config, and empty state (#519)
All checks were successful
ci/woodpecker/push/web Pipeline was successful
All checks were successful
ci/woodpecker/push/web Pipeline was successful
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #519.
This commit is contained in:
@@ -250,6 +250,46 @@ describe("ChatOverlay", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("new conversation button", () => {
|
||||
it("should render the new conversation button when chat is open", async () => {
|
||||
const { useChatOverlay } = await import("../../hooks/useChatOverlay");
|
||||
vi.mocked(useChatOverlay).mockReturnValue({
|
||||
isOpen: true,
|
||||
isMinimized: false,
|
||||
open: mockOpen,
|
||||
close: mockClose,
|
||||
minimize: mockMinimize,
|
||||
expand: mockExpand,
|
||||
toggle: mockToggle,
|
||||
toggleMinimize: mockToggleMinimize,
|
||||
});
|
||||
|
||||
render(<ChatOverlay />);
|
||||
|
||||
const newConvBtn = screen.getByRole("button", { name: /new conversation/i });
|
||||
expect(newConvBtn).toBeDefined();
|
||||
});
|
||||
|
||||
it("should have a tooltip on the new conversation button", async () => {
|
||||
const { useChatOverlay } = await import("../../hooks/useChatOverlay");
|
||||
vi.mocked(useChatOverlay).mockReturnValue({
|
||||
isOpen: true,
|
||||
isMinimized: false,
|
||||
open: mockOpen,
|
||||
close: mockClose,
|
||||
minimize: mockMinimize,
|
||||
expand: mockExpand,
|
||||
toggle: mockToggle,
|
||||
toggleMinimize: mockToggleMinimize,
|
||||
});
|
||||
|
||||
render(<ChatOverlay />);
|
||||
|
||||
const newConvBtn = screen.getByRole("button", { name: /new conversation/i });
|
||||
expect(newConvBtn.getAttribute("title")).toContain("Cmd+N");
|
||||
});
|
||||
});
|
||||
|
||||
describe("responsive design", () => {
|
||||
it("should render as a sidebar on desktop", () => {
|
||||
render(<ChatOverlay />);
|
||||
|
||||
Reference in New Issue
Block a user