From 7b3601eab2a777df442996e1e63f06ba91f0265a Mon Sep 17 00:00:00 2001 From: SJCoetz Date: Fri, 31 Jul 2026 14:01:40 +0200 Subject: [PATCH] test(stock-orders): Edit button row coverage Asserts the Edit button appears on draft rows only, and that clicking it opens the modal with the right editPurchaseId. The mock stops forwarding the click to the row's onClick via the existing e.stopPropagation() pattern in the implementation. Co-authored-by: Orca --- src/app/(app)/stock-orders/page.test.tsx | 89 +++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/src/app/(app)/stock-orders/page.test.tsx b/src/app/(app)/stock-orders/page.test.tsx index 3582438..5a0af73 100644 --- a/src/app/(app)/stock-orders/page.test.tsx +++ b/src/app/(app)/stock-orders/page.test.tsx @@ -76,11 +76,17 @@ vi.mock("@/components/stock-orders/quick-draft-modal", () => ({ QuickDraftModal: ({ open, onOpenChange, + editPurchaseId, }: { open: boolean; onOpenChange: (b: boolean) => void; + editPurchaseId?: string; }) => ( -
+