fix(webui): simplify temporary chat closing

This commit is contained in:
chengyongru authored and Xubin Ren committed 2026-08-08 23:20:59 +08:00
1 parent 656e0d606b
commit 516ae11c33
13 files changed
+24 -54

No files matched your search

+3 -8
View File
@@ -179,14 +179,9 @@ describe("ChatList", () => {
fireEvent.click(within(section).getByRole("button", { name: "Private planning" }));
expect(onSelect).toHaveBeenCalledWith("temporary:temporary-one");
fireEvent.pointerDown(
within(section).getByRole("button", { name: "Topic actions for Private planning" }),
{ button: 0 },
);
const closeItem = await screen.findByRole("menuitem", { name: "Close temporary chat" });
expect(closeItem).toHaveTextContent("Close");
expect(closeItem).toHaveClass("whitespace-nowrap");
fireEvent.click(closeItem);
fireEvent.click(within(section).getByRole("button", {
name: "Close temporary chat: Private planning",
}));
expect(onClose).toHaveBeenCalledWith("temporary:temporary-one");
});