feat(tickets): ajoute les pièces jointes sur tickets (#108)
Stockage flat côté ticket + métadonnées d'attachments, lecture exposée côté backend/MCP, et UI minimale de liste/ajout dans TicketDetail. Traverse le domaine (Issue, ports), l'application (usecases + assistant de ticket), les adaptateurs infra/MCP (issues store, orchestrateur), les DTO backend/web- server/app-tauri, et le frontend (domain/ports/adapters/hooks/UI). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -54,4 +54,47 @@ describe("TauriTicketGateway invoke payloads", () => {
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("wraps ticket attachment commands in the request DTO", async () => {
|
||||
const gateway = new TauriTicketGateway();
|
||||
|
||||
await gateway.addAttachment(
|
||||
"proj-1",
|
||||
"#12",
|
||||
"/tmp/note.txt",
|
||||
3,
|
||||
"text/plain",
|
||||
);
|
||||
await gateway.readAttachment("proj-1", "#12", "att-1");
|
||||
await gateway.markAttachmentSummarized("proj-1", "#12", "att-1", 4);
|
||||
|
||||
expect(invoke).toHaveBeenNthCalledWith(1, "ticket_attachment_add", {
|
||||
request: {
|
||||
projectId: "proj-1",
|
||||
ref: "#12",
|
||||
path: "/tmp/note.txt",
|
||||
expectedVersion: 3,
|
||||
mime: "text/plain",
|
||||
},
|
||||
});
|
||||
expect(invoke).toHaveBeenNthCalledWith(2, "ticket_attachment_read", {
|
||||
request: {
|
||||
projectId: "proj-1",
|
||||
ref: "#12",
|
||||
attachmentId: "att-1",
|
||||
},
|
||||
});
|
||||
expect(invoke).toHaveBeenNthCalledWith(
|
||||
3,
|
||||
"ticket_attachment_mark_summarized",
|
||||
{
|
||||
request: {
|
||||
projectId: "proj-1",
|
||||
ref: "#12",
|
||||
attachmentId: "att-1",
|
||||
expectedVersion: 4,
|
||||
},
|
||||
},
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user