fix(dashboard-tests): align remaining ChatView send assertions with FN-8502 delivery callbacks

Same drift as chat-commands/mobile: sendMessage gained the {onDelivered,onFailed}
third argument; autosize and draft suites now expect it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-07-24 00:09:44 -07:00
parent fa6e4fef22
commit 94f1bd9527
2 changed files with 6 additions and 2 deletions

View File

@@ -155,7 +155,9 @@ describe("ChatView composer autosize", () => {
await userEvent.click(screen.getAllByTestId("chat-send-btn")[0]);
await waitFor(() => {
expect(sendMessage).toHaveBeenCalledWith("line one\nline two\nline three", []);
// FNXC:ChatAttachments 2026-07-23-23:59:
// FN-8502 (1cd06746f) added the delivery-callback bag as sendMessage's third argument.
expect(sendMessage).toHaveBeenCalledWith("line one\nline two\nline three", [], expect.objectContaining({ onDelivered: expect.any(Function), onFailed: expect.any(Function) }));
expect(textarea).toHaveValue("");
const resetHeight = Number.parseInt(textarea.style.height, 10);
expect(resetHeight).toBeLessThan(expandedHeight);

View File

@@ -200,7 +200,9 @@ describe("ChatView draft persistence", () => {
await userEvent.click(screen.getAllByTestId("chat-send-btn")[0]);
await waitFor(() => {
expect(sendMessage).toHaveBeenCalledWith("send me", []);
// FNXC:ChatAttachments 2026-07-23-23:59:
// FN-8502 (1cd06746f) added the delivery-callback bag as sendMessage's third argument.
expect(sendMessage).toHaveBeenCalledWith("send me", [], expect.objectContaining({ onDelivered: expect.any(Function), onFailed: expect.any(Function) }));
expect(screen.getByPlaceholderText("Type a message...")).toHaveValue("");
expect(localStorage.getItem("fusion:chat-draft:direct:session-001")).toBeNull();
});