Fix: hand upload and rev approval lines name the person, not the user id; PLAN questions 53, 54 and the phase 10 note
ci / frontend (pull_request) Successful in 56s
ci / server (pull_request) Successful in 13m10s
ci / image (pull_request) Skipped
ci / e2e (pull_request) Successful in 5m51s

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-30 18:18:41 -06:00
co-authored by Claude Opus 5.5
parent a5246e2aa5
commit 1cf37d94e7
6 changed files with 18 additions and 8 deletions
+4 -1
View File
@@ -146,7 +146,7 @@ describe("Packet page, VISUAL box", () => {
it("uploads a hand BOM as multipart with the signature fields", async () => {
const fetch = mockFetch({
...base(visualDraft()),
"POST /api/packets/1/hand/bom": { body: visualDraft({ version: 4, visual: { manual_bom: { name: "bom.csv", reason: "No materials yet", lines: 3 } } }) },
"POST /api/packets/1/hand/bom": { body: visualDraft({ version: 4, visual: { manual_bom: { name: "bom.csv", reason: "No materials yet", lines: 3, by: "cf284ce9-e7a6-45d0-bba6-d46b752d553d", by_name: "Clara Clerk" } } }) },
});
renderApp("/packets/1");
fireEvent.click(await screen.findByRole("button", { name: "Upload BOM" }));
@@ -165,6 +165,9 @@ describe("Packet page, VISUAL box", () => {
expect((fd.get("file") as File).name).toBe("bom.csv");
expect(await screen.findByRole("button", { name: "Use VISUAL's BOM again" })).toBeInTheDocument();
expect(screen.getByText("BOM uploaded by hand:", { exact: false })).toBeInTheDocument();
// The line names the person, never the stored user id.
expect(screen.getByText(/BOM uploaded by hand:.*Clara Clerk/)).toBeInTheDocument();
expect(screen.queryByText(/cf284ce9/)).not.toBeInTheDocument();
});
it("uploads a hand drawing: the asset first, then the attach with reason and sign", async () => {